Skip to content

Conversation

@tdas
Copy link
Contributor

@tdas tdas commented Nov 16, 2016

This is a fix for branch-2.0 for the earlier PR #15895

What changes were proposed in this pull request?

SPARK-18459: triggerId seems like a number that should be increasing with each trigger, whether or not there is data in it. However, actually, triggerId increases only where there is a batch of data in a trigger. So its better to rename it to batchId.

SPARK-18460: triggerDetails was missing from json representation. Fixed it.

How was this patch tested?

Updated tests

@tdas tdas changed the base branch from master to branch-2.0 November 16, 2016 19:10
@zsxwing
Copy link
Member

zsxwing commented Nov 16, 2016

LGTM pending tests.

Copy link
Contributor

@marmbrus marmbrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this! A few other comments after looking at these metrics more closely.

"""
|{
| "name" : "query",
| "id" : 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should make this a String, both here and in the type-safe API. The reasoning is, its already auto generated and I think its likely we will want to turn this into a UUID (maybe we should even just do that). Thoughts?

| },
| "sourceStatuses" : [ {
| "description" : "MySource1",
| "offsetDesc" : "#0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these not JSON now?

| "isTriggerActive" : "true",
| "batchId" : "5",
| "latency.getOffset.total" : "10",
| "isDataPresentInTrigger" : "true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this redundant with numRows.input.total?

|"latency.getOffset.total":"10","isDataPresentInTrigger":"true"},
|"sourceStatuses":[{"description":"MySource1","offsetDesc":"#0","inputRate":15.5,
|"processingRate":23.5,"triggerDetails":{"numRows.input.source":"100",
|"latency.getOffset.source":"10","latency.getBatch.source":"20"}}],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider removing source. It is already nested inside of the list of sources.

| "latency" : 345.0,
| "triggerDetails" : {
| "latency.getBatch.total" : "20",
| "numRows.input.total" : "100",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to removing source I'd consider removing total since this all of these metrics relate to the entire query.

| "numRows.input.total" : "100",
| "isTriggerActive" : "true",
| "batchId" : "5",
| "latency.getOffset.total" : "10",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are the timestamps? I only see latency here.

@marmbrus
Copy link
Contributor

Oh sorry... I'm realizing I'm commenting on a PR for branch-2.0. We don't have to address these comments here, but we should make sure we are happy with all the naming before 2.1 is released.

@tdas
Copy link
Contributor Author

tdas commented Nov 16, 2016

@marmbrus I will make another PR to address those. Hopefully there wont be any more conflicts between master/2.1 and 2.0

@SparkQA
Copy link

SparkQA commented Nov 16, 2016

Test build #68729 has finished for PR 15908 at commit 7ccad31.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@zsxwing
Copy link
Member

zsxwing commented Nov 16, 2016

Sounds good. Merging to branch 2.0.

asfgit pushed a commit that referenced this pull request Nov 16, 2016
…atchId and add triggerDetails to json in StreamingQueryStatus (for branch-2.0)

This is a fix for branch-2.0 for the earlier PR #15895

## What changes were proposed in this pull request?

SPARK-18459: triggerId seems like a number that should be increasing with each trigger, whether or not there is data in it. However, actually, triggerId increases only where there is a batch of data in a trigger. So its better to rename it to batchId.

SPARK-18460: triggerDetails was missing from json representation. Fixed it.
## How was this patch tested?

Updated tests

Author: Tathagata Das <tathagata.das1565@gmail.com>

Closes #15908 from tdas/SPARK-18459-2.0.
@zsxwing
Copy link
Member

zsxwing commented Nov 16, 2016

@tdas Merged. Could you close this one, please?

@tdas tdas closed this Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants