-
Notifications
You must be signed in to change notification settings - Fork 2
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
[CAY-909] Notify client job progress #1081
Conversation
…er, implement DolphinDriverLauncher
@JunhoeKim The test has failed. Could you check it? |
I'm attaching error logs of Jenkins.
|
Sorry, I'll check it. |
…/cay into notify-client-job-progress
…ent-job-progress
Thanks @JunhoeKim for the PR! As we described in #1084, we need to update REEF at the Jenkins's local repository. Let's handle the issue this afternoon. Thanks! |
!rebuild |
Sorry, I closed this PR accidently. The build should be successful as I've rebuilt REEF at Jenkins's local repository. Let's see how it goes. :) |
Great :) |
I'll take a look at the PR tonight :) |
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.
Overall it looks good :)
I've left several minor comments.
Please take a look!
import java.util.logging.Logger; | ||
|
||
/** | ||
* A launcher for Dolphin driver. |
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.
This class is not specific for Dolphin.
Could you rewrite the comment?
You may use the comment of REEF's DriverLauncher
and specify what you modified.
return this.status; | ||
} | ||
|
||
/** Update job status and notify the waiting thread. */ |
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.
Though it's copied from REEF's code, let's make it in the right form by breaking lines.
/** | ||
* Handler of {@link JobMessage} from driver. | ||
* It logs progress report to console. | ||
*/ |
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.
Please fix the indentation.
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package edu.snu.cay.common; |
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.
Let's put it into edu.snu.cay.common.client
package.
@@ -143,7 +142,6 @@ public static LauncherStatus launch(final String jobName, | |||
basicParameterInjector.getNamedInstance(LocalRuntimeMaxNumEvaluators.class), | |||
basicParameterInjector.getNamedInstance(JVMHeapSlack.class)) : | |||
getYarnRuntimeConfiguration(basicParameterInjector.getNamedInstance(JVMHeapSlack.class)); | |||
|
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.
Could you undo this change, which is irrelevant from the PR?
@@ -72,6 +72,11 @@ | |||
*/ | |||
private int globalMinimumClock; | |||
|
|||
/** | |||
* The list of EventHandler about progress update. |
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.
The list of listeners for the update of {@link #globalMinimumClock}.
/** | ||
* The list of EventHandler about progress update. | ||
*/ | ||
private final List<EventHandler<Integer>> progressUpdateCallbacks = new ArrayList<>(); |
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.
Better to rename it as clockUpdateListeners
.
* Add listener to progress update list. | ||
* @param callback when #globalMinimumClock increases, callback functions in list are called. | ||
*/ | ||
public void addProgressUpdateListener(final EventHandler<Integer> callback) { |
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.
Let's rename it as addClockUpdateListener
.
Thank you, I'll check and resolve them. |
@JunhoeKim Is it ready for review? |
3513280
to
6e0e9aa
Compare
LGTM. I'll merge it once test pass. |
It looks that Jenkins uses jar files of PR branches. |
Closed #909
This PR implements a messaging channel between Dolphin driver and client. so Dolphin driver can notify progress information to client in each epoch time.