Skip to content

[SPARK-15480][UI][Streaming]show missed InputInfo in streaming UI - #13259

Closed
mwws wants to merge 3 commits into
apache:masterfrom
mwws:SPARK-UI-StreamingInput
Closed

[SPARK-15480][UI][Streaming]show missed InputInfo in streaming UI#13259
mwws wants to merge 3 commits into
apache:masterfrom
mwws:SPARK-UI-StreamingInput

Conversation

@mwws

@mwwsmwws commented May 23, 2016

Copy link
Copy Markdown

What changes were proposed in this pull request?

It's a bug in Streaming UI. If BatchDuration is changed by window operation, InputInfo on time with no output ops will not be shown in streaming UI.

Here is a simple example to reproduce:

valinputDStream=KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParam, topic)
valmatchedDStream= inputDStream.window(batchInteval*2, batchInteval*2)
matchedDStream.foreachRDD(rdd => {
valcount= rdd.count()
println(s"2 count number: ${count}")
})

How was this patch tested?

manually tested

I manually input 6 records from Kafka. According to output, there are indeed 6 records processed
output

but according to web UI, input records show 0.
original

And here is the Screenshot after my change:
newresult

@SparkQA

Copy link
Copy Markdown

Test build #59124 has finished for PR 13259 at commit 83351b8.

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

@mwws

mwws commented May 24, 2016

Copy link
Copy Markdown
Author

@chenghao-intel

Copy link
Copy Markdown
Contributor

cc @zsxwing

inputInfoMissedTimes.foreach (time => {
val streamIdToInputInfos = inputInfoTracker.getInfo(time)
val fakeJobSet = JobSet(time, Seq(), streamIdToInputInfos)
listenerBus.post(StreamingListenerBatchCompleted(fakeJobSet.toBatchInfo))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will this change the semantics if posing fake StreamingListenerBatchCompleted, if user's code rely on this, will this break their assumptions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Good point, it would be a breaking change in that case. Give the fact that some information is indeed missing now, we need either send more events or add additional fields in current event. The later might be better and more correct in semantics, although it can still break current implementation of user's custom listener. And I noticed that listener interface is annotated as DeveloperAPI, so it's expected that API might be changed. How do you think?

@zsxwing

zsxwing commented May 24, 2016

Copy link
Copy Markdown
Member

I suggest we change InputInfoTracker.getInfo(batchTime: Time) to InputInfoTracker.getInfo(batchTime: Time, batchDuration: Long) and let InputInfoTracker return the aggregated input infos between batchTime - batchDuration and batchTime.

@mwws

mwws commented May 25, 2016

Copy link
Copy Markdown
Author

@zsxwing thank you for the suggestion, But I have two concerns:

  1. There could be multiple output ops on one BatchTime. And these ops could have different batchDuration. Which one should I use?
  2. The input rate graph is generated by the input size column of batch table. If we do the aggregation, the meaning of input rate graph will be changed from "number of input events from source" to "number of processed events".

@zsxwing

zsxwing commented May 26, 2016

Copy link
Copy Markdown
Member

@zsxwing thank you for the suggestion, But I have two concerns:

  1. There could be multiple output ops on one BatchTime. And these ops could have different batchDuration. Which one should I use?
  2. The input rate graph is generated by the input size column of batch table. If we do the aggregation, the meaning of input rate graph will be changed from "number of input events from source" to "number of processed events".

How about adding a field lastBatchTime in JobScheduler and storing the last submitted batch? Then just use the aggregated input infos between the last batch and the current batch? We need to aggregate them since we only have batch infos that have jobs.

1. revert perivous change
2. add batchTimesWithNoJob Set to record the batch with no job
3. add aggrate method of InputInfo
@mwws

mwws commented Jun 1, 2016

Copy link
Copy Markdown
Author

@zsxwing Thanks for your suggestion, I have re-implemented this PR according to that. But instead of maintaining state lastBatchTime in JobScheduler, I would prefer record such info in JobGenerator, so we can have central place to resolve inputInfo.

I according to my manual test the new code works. Could you help review again?

@SparkQA

Copy link
Copy Markdown

Test build #59730 has finished for PR 13259 at commit a3d05e0.

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

@zsxwing

Copy link
Copy Markdown
Member

@mwws sorry for the delay. Could you add a unit test, please?

@mwws

mwws commented Jun 7, 2016

Copy link
Copy Markdown
Author

@zsxwing Yes sir, a unit test has been added.

@SparkQA

Copy link
Copy Markdown

Test build #60095 has finished for PR 13259 at commit ffd1787.

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

@tdas

tdas commented Oct 25, 2016

Copy link
Copy Markdown
Contributor

@zsxwing Could you take a look at this PR. Would be good to merge this.

@mwws

mwws commented Nov 7, 2016

Copy link
Copy Markdown
Author

@zsxwing This patch has been pended for a long time, could you help to review?

@maropumaropu mentioned this pull request Apr 23, 2017
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
This pr proposed to close stale PRs. Currently, we have 400+ open PRs and there are some stale PRs whose JIRA tickets have been already closed and whose JIRA tickets does not exist (also, they seem not to be minor issues).
// Open PRs whose JIRA tickets have been already closed
Closesapache#11785Closesapache#13027Closesapache#13614Closesapache#13761Closesapache#15197Closesapache#14006Closesapache#12576Closesapache#15447Closesapache#13259Closesapache#15616Closesapache#14473Closesapache#16638Closesapache#16146Closesapache#17269Closesapache#17313Closesapache#17418Closesapache#17485Closesapache#17551Closesapache#17463Closesapache#17625
// Open PRs whose JIRA tickets does not exist and they are not minor issues
Closesapache#10739Closesapache#15193Closesapache#15344Closesapache#14804Closesapache#16993Closesapache#17040Closesapache#15180Closesapache#17238
N/A
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closesapache#17734 from maropu/resolved_pr.
Change-Id: Id2e590aa7283fe5ac01424d30a40df06da6098b5
zifeif2 pushed a commit to zifeif2/spark that referenced this pull request Nov 22, 2025
## What changes were proposed in this pull request?
This pr proposed to close stale PRs. Currently, we have 400+ open PRs and there are some stale PRs whose JIRA tickets have been already closed and whose JIRA tickets does not exist (also, they seem not to be minor issues).
// Open PRs whose JIRA tickets have been already closed
Closesapache#11785Closesapache#13027Closesapache#13614Closesapache#13761Closesapache#15197Closesapache#14006Closesapache#12576Closesapache#15447Closesapache#13259Closesapache#15616Closesapache#14473Closesapache#16638Closesapache#16146Closesapache#17269Closesapache#17313Closesapache#17418Closesapache#17485Closesapache#17551Closesapache#17463Closesapache#17625
// Open PRs whose JIRA tickets does not exist and they are not minor issues
Closesapache#10739Closesapache#15193Closesapache#15344Closesapache#14804Closesapache#16993Closesapache#17040Closesapache#15180Closesapache#17238
## How was this patch tested?
N/A
Author: Takeshi Yamamuro <yamamuro@apache.org>
Closesapache#17734 from maropu/resolved_pr.
Sign up for freeto 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.

7 participants

@mwws@SparkQA@chenghao-intel@zsxwing@tdas@jerryshao@wei-mao-intel