-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-7889] [UI] make sure click the "App ID" on HistoryPage, the SparkUI will be refreshed. #6545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Can you explain this more? what does this accomplish that isn't accomplished by refreshing the page? and unless the page is refreshed I would not expect an update. This code has a lot of style problems like indentation too. |
|
Hey Sean, what we wanna fix is the "load once, show them forever" issue. That is to say, when user click a link on history page, the provider will load an application information from persistent layer into memory and will never update it. So if the click happened with application incompleted, then no matter what the followed operations are, the history page will show the incompleted infomation ever. Obviously it is a problem. We have not much experience at Jetty so maybe it is not a perfect solution by now. We are welcome for any feedback. |
|
Can I suggest that you start by creating a failing test case? You can try to follow the examples in |
|
I wonder if it is a good idea that we have a custom HandlerCollection. |
|
@tsudukim Sorry, I don't agree with you, "spark.history.retainedApplications" can't to be 0 I think |
|
It makes sense that the issue might be from caching applications. I think @tsudukim wasn't saying that "spark.history.retainedApplications = 0" is a permanent solution, just a temporary workaround if you need this in a currently deployed system. It seems like this one commit was trying to solve the problem by preventing caching of incomplete apps, right? Those changes look reasonable -- do they solve the problem alone? there is a lot of other stuff in this PR that seems pretty irrelevant, so its hard to make sense of it. Again, a test case would help out a lot. |
|
I think the reason is not just because of the appCache. After my debug the code, I found there are two mainly reasons: |
|
Hi @XuTingjun the updated description makes sense. Also I took a really quick look at the patch and it seems reasonable. however I'm going to defer reviewing this closely until I see a new test to reproduce this. I am happy to help write that test if you need it, but I'd prefer if you do it :) in any case I'll have jenkins start testing this as is ... |
|
jenkins, ok to test |
|
Hi @squito, I think I need your help, I am not clearly know how to write this test. |
|
OK no problem @XuTingjun , happy to help, though I think unfortunately I am unlikely to get to this until after spark summit. Sorry for the delay, feel free to bug me again if you don't hear from me by end of next week. and anyone else is free to jump in the meantime as well :) |
|
Jenkins, this is ok to test |
Accordingly, why don't I implement my simple discard algorithm and the test? If that isn't enough we can look at this code? |
|
@squito, Can you pay attention on this? Thanks. |
|
sorry for the delay, I'm just looking at this again. @steveloughran I want to make sure I understand what you are proposing -- that fix would be totally independent of the ATS work for SPARK-1537, right? I see the relationship, but think they are best tackled in separate PRs (i think that is what you are describing, just want to double check). Just thinking aloud here -- my only concern with adding an expiry time is that you never know what to set it to, and it might be a little confusing to users. I was thinking we could add another query param @XuTingjun how about you help take a look at what @steveloughran comes up with and see if it addresses your concerns? |
|
-yes, independent. SPARK-1537: implements the HistoryProvider in YARN, gets it from ATS, etc, etc. The JIRA we are looking at here, where my patch is pull/6935 says "we ask the provider for the app UI again if it is (a) incomplete and (b) being asked for after some defined interval" . I know deciding what's a good interval is hard, as there's a tradeoff in responsiveness and system load —I'll leave it to others to suggest a good default there. |
|
...I'm looking at this and my PR; I think they are differently interdependent.
There's some extra map datastructures added in HistoryServer and FsHistoryProvider to aid this. In comparison, my pull request #6935, does all its work in a pulled out ApplicationCache, which adds a completed flag and a timestamp, the goal being that a refresh is triggered if !completed and now > timestamp + interval. But that PR doesn't: join up the web UI, or let the providers declare that an app has completed except by a complete reload of their UI I think the things can be merged; I'd have mine being able to query (indirectly) the history provider to see if the app has completed. or even better: if it has changed since the last reload. That would eliminate wasteful reloads. How to achieve this? either the cache calls through to the history provider, or the history provider itself provides some callback for the cache entries to invoke. There's one more option to consider here. Why do we actually replay-then-pause in-progress applications? Why not have a thread continually loading them and forwarding events until they complete? In this mode, there's no need to reload the cache, replay events....the UI just stays up to date. I'll cover that on my PR |
|
I'm going to close this pull request. If this is still relevant and you are interested in pushing it forward, please open a new pull request. Thanks! |
The bug is that: When clicking the app in incomplete page, the tasks progress is 100/2000. After the app finished, click into the app again, the tasks progress still shows 100/2000.
This patch I override the handle function in UIHandlerCollection. I just add the line 137-151, to make sure when click the "App ID" , the HistoryPage will refresh the SparkUI if it is incompleted.
The problem:
Though it makes the SparkUI can refresh, but the refresh is effective just after clicking the "App ID". If have entered the SparkUI, refresh makes no change.