-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[SPARK-8656][WebUI] Fix the webUI and JSON API number is not synced #7038
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,4 +107,8 @@ private[spark] class WorkerInfo( | |
def setState(state: WorkerState.Value): Unit = { | ||
this.state = state | ||
} | ||
|
||
def isAlive(): Boolean={ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No parens, return type or braces are needed. In fact is it worth writing a method? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reason why I write a method here is due to JsonProtocol.scala cannot access WorkerState.ALIVE. Changing the WorkerState from private to other permission is not good approach. I think it is the best way to keep the current class/namespace struct and get thing done. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please add space around |
||
this.state == WorkerState.ALIVE | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do the filtering so many times?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can refactor this better later. Let me find the API author first. Thanks