-
Notifications
You must be signed in to change notification settings - Fork 117
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
Add support for configurable JDKs #316
Conversation
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.
Looks very good to me! Left some minor comments about the details.
One other thought that comes to me is that it would be useful to add Java 8 vs. 11 to the acceptance tests somehow. Not that every test should run twice, once with Java 8 and once with Java 11, but that there should be at least one test that somehow makes sure this Java flag is working for some common use case.
Do you think there is a simple way we can add a test like that?
…dk_repo function Change jdk option name to java-version/java_version and make it an int If the correct version of Java is already installed then do not install again Add warning if the java version is being downgraded
5d53804
to
45e1523
Compare
* add spot request duration (looks like this was not working before?) * add java version
5c455a9
to
22623d4
Compare
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.
@sfcoy, this looks great! I think a couple final tweaks and it's ready to go. I will also make time to test it myself this week.
By the way, a request: If you can, please avoid force pushing the branch. It disconnects review comments from the PR commit history and makes it a bit harder to follow review comments over time.
I'm guessing you did it to overcome some troubles updating the branch from the latest master
? At this point it may be easier to just manually delete the spot request duration stuff and push a new commit. I will squash the whole PR into a single commit when merging to master
, anyway.
Added more documentation
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.
One other thought that comes to me is that it would be useful to add Java 8 vs. 11 to the acceptance tests somehow. Not that every test should run twice, once with Java 8 and once with Java 11, but that there should be at least one test that somehow makes sure this Java flag is working for some common use case.
Do you think there is a simple way we can add a test like that?
It would be nice if we could. However I am not currently up with modern python testing methodology (I'm a Java guy).
Right now I manually test four scenarios:
- Vanilla AMI with no Java installed
- Java 11 AMI with java-version: 8
- Java 11 AMI with java-version: 11
- Java 11 AMI with java-version: 14
I had to build my own Java 11 AMI because the only existing ones seem to require subscriptions and AWS was being cranky about these today (returning 400 errors).
@@ -722,6 +726,8 @@ def stop(cli_context, cluster_name, ec2_region, ec2_vpc_id, assume_yes): | |||
help="Path to SSH .pem file for accessing nodes.") | |||
@click.option('--ec2-user') | |||
@click.option('--ec2-spot-price', type=float) | |||
@click.option('--ec2-spot-request-duration', default='7d', |
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.
Hi @nchammas ,
I suspect that "add-slaves" in master is not working right now because this "ec2_spot_request_duration" parameter is missing.
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.
Good catch. I'll report this over on #315.
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 PR is good to go. If I can trouble you for one more improvement, it would be to display a warning if the user launches a cluster with Hadoop < 3.3 and Java 11. Only Hadoop 3.3+ are compatible with Java 11+.
If you try to launch a cluster with Hadoop 3.2 and Java 11, you get an error like this on starting up HDFS:
2021-01-04 00:17:27,413 ERROR [main] namenode.NameNode (NameNode.java:main(1764)) -
Failed to start namenode.
java.lang.ExceptionInInitializerError
at org.eclipse.jetty.webapp.WebInfConfiguration.findAndFilterContainerPaths
(WebInfConfiguration.java:185)
...
Caused by: java.lang.IllegalArgumentException: Invalid Java version 11.0.9.1
I would probably add the check somewhere here:
flintrock/flintrock/flintrock.py
Lines 406 to 412 in 22623d4
if install_hdfs: | |
validate_download_source(hdfs_download_source) | |
hdfs = HDFS( | |
version=hdfs_version, | |
download_source=hdfs_download_source, | |
) | |
services += [hdfs] |
No worries if you can't get to it. In that case, I will push an appropriate fix to this branch before merging it in, if you don't mind.
@@ -722,6 +726,8 @@ def stop(cli_context, cluster_name, ec2_region, ec2_vpc_id, assume_yes): | |||
help="Path to SSH .pem file for accessing nodes.") | |||
@click.option('--ec2-user') | |||
@click.option('--ec2-spot-price', type=float) | |||
@click.option('--ec2-spot-request-duration', default='7d', |
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.
Good catch. I'll report this over on #315.
The Hadoop team must have added a Java version check, because I have actually built and run this combination before. |
No worries mate. I was actually becoming a little concerned about you, given the Covid situation and all. |
* Add support for configurable JDKs * Perform complete adoptopenjdk.repo installation in install_adoptopenjdk_repo function Change jdk option name to java-version/java_version and make it an int If the correct version of Java is already installed then do not install again Add warning if the java version is being downgraded * Fix add_slaves functionality * add spot request duration (looks like this was not working before?) * add java version * Cleaned up and clarified the Java installation logic. Added more documentation * tweak wording of docstring Co-authored-by: Nicholas Chammas <[email protected]>
This PR makes the following changes:
I tested this PR by...