SPARK-1209 [CORE] (Take 2) SparkHadoop{MapRed,MapReduce}Util should not use package org.apache.hadoop #3048
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.
@andrewor14 Another try at SPARK-1209, to address #2814 (comment)
I successfully tested with
mvn -Dhadoop.version=1.0.4 -DskipTests clean package; mvn -Dhadoop.version=1.0.4 test
I assume that is what failed Jenkins last time. I also tried-Dhadoop.version1.2.1
and-Phadoop-2.4 -Pyarn -Phive
for more coverage.So this is why the class was put in
org.apache.hadoop
to begin with, I assume. One option is to leave this as-is for now and move it only when Hadoop 1.0.x support goes away.This is the other option, which adds a call to force the constructor to be public at run-time. It's probably less surprising than putting Spark code in
org.apache.hadoop
, but, does involve reflection. ASecurityManager
might forbid this, but it would forbid a lot of stuff Spark does. This would also only affect Hadoop 1.0.x it seems.