Uh oh!
There was an error while loading. Please reload this page.
[SPARK-8656][WebUI] Fix the webUI and JSON API number is not synced - #7038
[SPARK-8656][WebUI] Fix the webUI and JSON API number is not synced#7038thegiive wants to merge 4 commits into
Conversation
AmplabJenkins
commented
Jun 26, 2015
Can one of the admins verify this patch? |
srowen
commented
Jun 26, 2015
This is changing the semantics of the response though. I don't think you can necessarily do this. It is not necessarily true that what is presented in the web UI for human consumption is identical to what's in the JSON response for machine consumption. You should ask the person who created this API to see if there is or should be a way to get just alive workers status. Is this info not in the response? |
There was a problem hiding this comment.
I can refactor this better later. Let me find the API author first. Thanks
thegiive
commented
Jun 26, 2015
HI Sean, thanks for your opinion. My feeling is that WebUI and API is just different presentation format. But the content should be the same. Different meaning in the same column(workers,memory,core) will confuse the user. BTW, Let me talk to API author first :) |
thegiive
commented
Jun 26, 2015
Base on git blame, I think the JSON API creator is @rxin ( 9db1e50 ) Hi Reynold #6317 has already change some master UI's data's definition (total memory/memory in used , total core/core in used ) . How do you think? |
andrewor14
commented
Jun 29, 2015
ok to test |
andrewor14
commented
Jun 29, 2015
I think we should have the JSON protocol do whatever the normal UI does. This change looks fine. |
andrewor14
commented
Jun 29, 2015
@thegiive have you verified that these are the only sources of mismatch? |
AmplabJenkins
commented
Jun 29, 2015
Merged build triggered. |
AmplabJenkins
commented
Jun 29, 2015
Merged build started. |
SparkQA
commented
Jun 29, 2015
Test build #36030 has started for PR 7038 at commit |
SparkQA
commented
Jun 29, 2015
Test build #36030 has finished for PR 7038 at commit
|
AmplabJenkins
commented
Jun 29, 2015
Merged build finished. Test PASSed. |
andrewor14
commented
Jul 2, 2015
rxin
commented
Jul 2, 2015
what's the non-compatible part? |
srowen
commented
Jul 2, 2015
I think just that the response will have different information now -- are people relying on and properly expecting to get info for all workers in the JSON? then removing non-alive worker info is incompatible in that sense. |
rxin
commented
Jul 2, 2015
ic - to me it is almost incorrect in the past, and we are fixing a bug here ... |
AmplabJenkins
commented
Jul 3, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 3, 2015
Merged build started. |
thegiive
commented
Jul 3, 2015
Hi all reviewer I modified the code base on the comment. |
SparkQA
commented
Jul 3, 2015
Test build #36464 has started for PR 7038 at commit |
SparkQA
commented
Jul 3, 2015
Test build #36464 has finished for PR 7038 at commit
|
AmplabJenkins
commented
Jul 3, 2015
Merged build finished. Test FAILed. |
There was a problem hiding this comment.
in Spark we generally use camel case, so:
val aliveWorkers = obj.workers.filter(_.state == WorkerState.ALIVE)
There was a problem hiding this comment.
Hi Andrew
WorkerState is org.apache.spark.deploy.master's private object. JsonProtocol cannot resolved WorkerState due to class visibility.This code cannot work unless we change WorkerState code.
I think best way to do that is add a one line method on WorkerInfo
How do you think?
There was a problem hiding this comment.
BTW, I will change the variable name to camel case without any problem
AmplabJenkins
commented
Jul 3, 2015
Merged build triggered. |
AmplabJenkins
commented
Jul 3, 2015
Merged build started. |
SparkQA
commented
Jul 3, 2015
Test build #36515 has started for PR 7038 at commit |
SparkQA
commented
Jul 3, 2015
Test build #36515 has finished for PR 7038 at commit
|
AmplabJenkins
commented
Jul 3, 2015
Merged build finished. Test PASSed. |
thegiive
commented
Jul 4, 2015
HI @andrewor14 The test is passed. If there is any problem I need to change, please let me know. Thanks |
srowen
commented
Jul 6, 2015
LGTM |
andrewor14
commented
Jul 6, 2015
Ok, I'm merging this into master. Thanks @thegiive. |
Spark standalone master web UI show "Alive Workers" total core, total used cores and "Alive workers" total memory, memory used.
But the JSON API page "http://MASTERURL:8088/json" shows "ALL workers" core, memory number.
This webUI data is not sync with the JSON API.
The proper way is to sync the number with webUI and JSON API.