diff options
author | Michael Armbrust <michael@databricks.com> | 2016-12-07 15:36:29 -0800 |
---|---|---|
committer | Tathagata Das <tathagata.das1565@gmail.com> | 2016-12-07 15:36:29 -0800 |
commit | 70b2bf717d367d598c5a238d569d62c777e63fde (patch) | |
tree | 340f28fa9c4072d237ebc10097e5d2c69142b555 /python/pyspark/sql | |
parent | edc87e18922b98be47c298cdc3daa2b049a737e9 (diff) | |
download | spark-70b2bf717d367d598c5a238d569d62c777e63fde.tar.gz spark-70b2bf717d367d598c5a238d569d62c777e63fde.tar.bz2 spark-70b2bf717d367d598c5a238d569d62c777e63fde.zip |
[SPARK-18754][SS] Rename recentProgresses to recentProgress
Based on an informal survey, users find this option easier to understand / remember.
Author: Michael Armbrust <michael@databricks.com>
Closes #16182 from marmbrus/renameRecentProgress.
Diffstat (limited to 'python/pyspark/sql')
-rw-r--r-- | python/pyspark/sql/streaming.py | 6 | ||||
-rw-r--r-- | python/pyspark/sql/tests.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/python/pyspark/sql/streaming.py b/python/pyspark/sql/streaming.py index ee7a26d00d..9cfb3fe25c 100644 --- a/python/pyspark/sql/streaming.py +++ b/python/pyspark/sql/streaming.py @@ -114,12 +114,12 @@ class StreamingQuery(object): @property @since(2.1) - def recentProgresses(self): + def recentProgress(self): """Returns an array of the most recent [[StreamingQueryProgress]] updates for this query. The number of progress updates retained for each stream is configured by Spark session - configuration `spark.sql.streaming.numRecentProgresses`. + configuration `spark.sql.streaming.numRecentProgressUpdates`. """ - return [json.loads(p.json()) for p in self._jsq.recentProgresses()] + return [json.loads(p.json()) for p in self._jsq.recentProgress()] @property @since(2.1) diff --git a/python/pyspark/sql/tests.py b/python/pyspark/sql/tests.py index 66a3490a64..50df68b144 100644 --- a/python/pyspark/sql/tests.py +++ b/python/pyspark/sql/tests.py @@ -1116,11 +1116,11 @@ class SQLTests(ReusedPySparkTestCase): try: q.processAllAvailable() lastProgress = q.lastProgress - recentProgresses = q.recentProgresses + recentProgress = q.recentProgress status = q.status self.assertEqual(lastProgress['name'], q.name) self.assertEqual(lastProgress['id'], q.id) - self.assertTrue(any(p == lastProgress for p in recentProgresses)) + self.assertTrue(any(p == lastProgress for p in recentProgress)) self.assertTrue( "message" in status and "isDataAvailable" in status and |