Skip to content
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

A Notebook submitter to run Jupyter Notebook inside cluster #13

Merged
merged 10 commits into from
Oct 2, 2018

Conversation

oliverhu
Copy link
Member

No description provided.

@oliverhu oliverhu requested review from erwa and hungj September 19, 2018 06:35
Copy link
Contributor

@erwa erwa left a comment

Choose a reason for hiding this comment

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

If the client dies (e.g.: because SSH session dies), what prevents the YARN application from running forever? I think the AM should also be configured so that it automatically exits after some reason amount of time, if the TonYClient does not kill it before.

Can you provide a README with an example of how to submit the notebook with all the arguments required?

tony-core/src/main/java/com/linkedin/tony/Constants.java Outdated Show resolved Hide resolved
@@ -48,6 +46,8 @@

public static final String WORKER_JOB_NAME = "worker";
public static final String PS_JOB_NAME = "ps";
public static final String NOTEBOOK_JOB_NAME = "Notebook";
public static final String DRIVER_JOB_NAME = "Driver";
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I understand what this is used for?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is used for sending the address:port of notebook back to TonyClient

@oliverhu oliverhu added this to To do in TonY 0.2 Oct 1, 2018
TonY 0.2 automation moved this from To do to Reviewer approved Oct 1, 2018
Copy link
Contributor

@erwa erwa left a comment

Choose a reason for hiding this comment

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

Right now, client.cleanUp() calls amRpcClient.finishApplication() which sets shouldExit = true in the AM. However, this is only checked in the AM's stop() method, We should also check shouldExit in the monitor() loop to prevent the application from running forever even when the client dies.

Feel free to file an Issue for this and address in a separate PR if you like.

build.gradle Outdated Show resolved Hide resolved
tony-core/src/main/java/com/linkedin/tony/TonyClient.java Outdated Show resolved Hide resolved
private static final String ARCHIVE_PATH = "tf_archive.zip";
private Configuration tonyConf;
private final long clientStartTime = System.currentTimeMillis();
private Path appResourcesPath;
private int hbInterval;
private int maxHbMisses;

// For access from CLI.
public Set<TaskUrl> taskUrls = new HashSet<>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a getter for taskUrls that wraps the Set<TaskUrl> in a Guava ImmutableSet to prevent manipulation by code outside this class?

Copy link
Member Author

Choose a reason for hiding this comment

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

makes sense

Copy link
Member Author

Choose a reason for hiding this comment

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

this doesn't look performant tho? You'd have to use ImmutableSet.copyOf(xxx) which copies everything ?

Copy link
Contributor

@erwa erwa Oct 5, 2018

Choose a reason for hiding this comment

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

True, it does copy everything, but I doubt this will ever be the performance bottleneck. Correctness/safety first, then performance.

@oliverhu
Copy link
Member Author

oliverhu commented Oct 2, 2018

validated functionality again after all the updates and it works, merging it!

@oliverhu oliverhu merged commit cc0820a into master Oct 2, 2018
TonY 0.2 automation moved this from Reviewer approved to Done Oct 2, 2018
@oliverhu oliverhu deleted the notebookSubmitter branch October 9, 2018 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
TonY 0.2
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants