-
Notifications
You must be signed in to change notification settings - Fork 29.3k
SPARK-1556. jets3t dep doesn't update properly with newer Hadoop versions #629
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f21f356
Build changes to set up for jets3t fix
srowen bbed826
Use jets3t 0.9.0 for Hadoop 2.3+ (and correct similar regex issue in …
srowen 274f4f9
Make jets3t a runtime dependency, and bring its exclusion up into par…
srowen a2105fd
Add hadoop-2.4 profile and don't set hadoop.version in profiles
srowen c3fa967
Fix hadoop-2.4 profile typo in doc
srowen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,9 +29,22 @@ You can fix this by setting the `MAVEN_OPTS` variable as discussed before. | |
|
|
||
| ## Specifying the Hadoop version ## | ||
|
|
||
| Because HDFS is not protocol-compatible across versions, if you want to read from HDFS, you'll need to build Spark against the specific HDFS version in your environment. You can do this through the "hadoop.version" property. If unset, Spark will build against Hadoop 1.0.4 by default. | ||
|
|
||
| For Apache Hadoop versions 1.x, Cloudera CDH MRv1, and other Hadoop versions without YARN, use: | ||
| Because HDFS is not protocol-compatible across versions, if you want to read from HDFS, you'll need to build Spark against the specific HDFS version in your environment. You can do this through the "hadoop.version" property. If unset, Spark will build against Hadoop 1.0.4 by default. Note that certain build profiles are required for particular Hadoop versions: | ||
|
|
||
| <table class="table"> | ||
| <thead> | ||
| <tr><th>Hadoop version</th><th>Profile required</th></tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr><td>0.23.x</td><td>hadoop-0.23</td></tr> | ||
| <tr><td>1.x to 2.1.x</td><td>(none)</td></tr> | ||
| <tr><td>2.2.x</td><td>hadoop-2.2</td></tr> | ||
| <tr><td>2.3.x</td><td>hadoop-2.3</td></tr> | ||
| <tr><td>2.4.x</td><td>hadoop-2.4</td></tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
| For Apache Hadoop versions 1.x, Cloudera CDH "mr1" distributions, and other Hadoop versions without YARN, use: | ||
|
|
||
| # Apache Hadoop 1.2.1 | ||
| $ mvn -Dhadoop.version=1.2.1 -DskipTests clean package | ||
|
|
@@ -42,22 +55,40 @@ For Apache Hadoop versions 1.x, Cloudera CDH MRv1, and other Hadoop versions wit | |
| # Apache Hadoop 0.23.x | ||
| $ mvn -Phadoop-0.23 -Dhadoop.version=0.23.7 -DskipTests clean package | ||
|
|
||
| For Apache Hadoop 2.x, 0.23.x, Cloudera CDH MRv2, and other Hadoop versions with YARN, you can enable the "yarn-alpha" or "yarn" profile and set the "hadoop.version", "yarn.version" property. Note that Hadoop 0.23.X requires a special `-Phadoop-0.23` profile: | ||
| For Apache Hadoop 2.x, 0.23.x, Cloudera CDH, and other Hadoop versions with YARN, you can enable the "yarn-alpha" or "yarn" profile and optionally set the "yarn.version" property if it is different from "hadoop.version". The additional build profile required depends on the YARN version: | ||
|
|
||
| <table class="table"> | ||
| <thead> | ||
| <tr><th>YARN version</th><th>Profile required</th></tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr><td>0.23.x to 2.1.x</td><td>yarn-alpha</td></tr> | ||
| <tr><td>2.2.x and later</td><td>yarn</td></tr> | ||
| </tbody> | ||
| </table> | ||
|
|
||
| Examples: | ||
|
|
||
| # Apache Hadoop 2.0.5-alpha | ||
| $ mvn -Pyarn-alpha -Dhadoop.version=2.0.5-alpha -DskipTests clean package | ||
|
|
||
| # Cloudera CDH 4.2.0 with MapReduce v2 | ||
| # Cloudera CDH 4.2.0 | ||
| $ mvn -Pyarn-alpha -Dhadoop.version=2.0.0-cdh4.2.0 -DskipTests clean package | ||
|
|
||
| # Apache Hadoop 2.2.X (e.g. 2.2.0 as below) and newer | ||
| $ mvn -Pyarn -Dhadoop.version=2.2.0 -DskipTests clean package | ||
|
|
||
| # Apache Hadoop 0.23.x | ||
| $ mvn -Pyarn-alpha -Phadoop-0.23 -Dhadoop.version=0.23.7 -Dyarn.version=0.23.7 -DskipTests clean package | ||
| $ mvn -Pyarn-alpha -Phadoop-0.23 -Dhadoop.version=0.23.7 -DskipTests clean package | ||
|
|
||
| # Apache Hadoop 2.2.X | ||
| $ mvn -Pyarn -Phadoop-2.2 -Dhadoop.version=2.2.0 -DskipTests clean package | ||
|
|
||
| # Apache Hadoop 2.3.X | ||
| $ mvn -Pyarn -Phadoop-2.3 -Dhadoop.version=2.3.0 -DskipTests clean package | ||
|
|
||
| # Apache Hadoop 2.4.X | ||
| $ mvn -Pyarn -Phadoop-2.3 -Dhadoop.version=2.4.0 -DskipTests clean package | ||
|
Contributor
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. Should be |
||
|
|
||
| # Different versions of HDFS and YARN. | ||
| $ mvn -Pyarn-alpha -Dhadoop.version=2.3.0 -Dyarn.version=0.23.7 -DskipTests clean package | ||
| $ mvn -Pyarn-alpha -Phadoop-2.3 -Dhadoop.version=2.3.0 -Dyarn.version=0.23.7 -DskipTests clean package | ||
|
|
||
| ## Spark Tests in Maven ## | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we just make a profile called
hadoop-2.4, even if the dependencies don't change... it might make it simpler for users to reason about.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.
For instance, right now we suggest to use this for all hadoop-2.3+, but who knows if Hadoop will change it's dep graph in the future such that those builds don't actually work. It might be better to just create individual profiles for the ones we know we currently support via this workaround.