Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16294#discussion_r93717114
  
    --- Diff: docs/structured-streaming-programming-guide.md ---
    @@ -1138,78 +1373,91 @@ Status of query 'queryName'
     {% highlight java %}
     StreamingQuery query = ...
     
    -System.out.println(query.status);
    +System.out.println(query.progress);
    +/* Will print something like the following.
    +
    +{
    +  "id" : "ce011fdc-8762-4dcb-84eb-a77333e28109",
    +  "runId" : "88e2ff94-ede0-45a8-b687-6316fbef529a",
    +  "name" : "MyQuery",
    +  "timestamp" : "2016-12-14T18:45:24.873Z",
    +  "numInputRows" : 10,
    +  "inputRowsPerSecond" : 120.0,
    +  "processedRowsPerSecond" : 200.0,
    +  "durationMs" : {
    +    "triggerExecution" : 3,
    +    "getOffset" : 2
    +  },
    +  "eventTime" : {
    +    "watermark" : "2016-12-14T18:45:24.873Z"
    +  },
    +  "stateOperators" : [ ],
    +  "sources" : [ {
    +    "description" : "KafkaSource[Subscribe[topic-0]]",
    +    "startOffset" : {
    +      "topic-0" : {
    +        "2" : 0,
    +        "4" : 1,
    +        "1" : 1,
    +        "3" : 1,
    +        "0" : 1
    +      }
    +    },
    +    "endOffset" : {
    +      "topic-0" : {
    +        "2" : 0,
    +        "4" : 115,
    +        "1" : 134,
    +        "3" : 21,
    +        "0" : 534
    +      }
    +    },
    +    "numInputRows" : 10,
    +    "inputRowsPerSecond" : 120.0,
    +    "processedRowsPerSecond" : 200.0
    +  } ],
    +  "sink" : {
    +    "description" : "MemorySink"
    +  }
    +}
    +*/
    +
     
    -/* Will print the current status of the query
    -
    -Status of query 'queryName'
    -    Query id: 1
    -    Status timestamp: 123
    -    Input rate: 15.5 rows/sec
    -    Processing rate 23.5 rows/sec
    -    Latency: 345.0 ms
    -    Trigger details:
    -        batchId: 5
    -        isDataPresentInTrigger: true
    -        isTriggerActive: true
    -        latency.getBatch.total: 20
    -        latency.getOffset.total: 10
    -        numRows.input.total: 100
    -    Source statuses [1 source]:
    -        Source 1 - MySource1
    -            Available offset: 0
    -            Input rate: 15.5 rows/sec
    -            Processing rate: 23.5 rows/sec
    -            Trigger details:
    -                numRows.input.source: 100
    -                latency.getOffset.source: 10
    -                latency.getBatch.source: 20
    -    Sink status - MySink
    -        Committed offsets: [1, -]
    +System.out.println(query.status);
    +/*  Will print something like the following.
    +{
    +  "message" : "Waiting for data to arrive",
    +  "isDataAvailable" : false,
    +  "isTriggerActive" : false
    +}
     */
     {% endhighlight %}
     
     </div>
     <div data-lang="python"  markdown="1">
     
     {% highlight python %}
    -query = ...  // a StreamingQuery
    +query = ...  # a StreamingQuery
    +print(query.progress)
    --- End diff --
    
    nit: `lastProgress`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to