-
Notifications
You must be signed in to change notification settings - Fork 295
Allow to specify hadoop minor version (2.4 and 2.6 at the moment) #56
base: branch-2.0
Are you sure you want to change the base?
Changes from all commits
fde24d2
87153f2
a242d0b
064abd9
c282e06
a68ca9b
14f0d75
a308f74
97cbb6b
e46020c
c34d93e
d8d4803
c13a437
9e6920c
833f2de
750ede8
1c34483
46b6394
ad525d7
03e70b7
653f338
21e03d0
4a4f4a5
d7e73bf
332b90b
71c7047
a924690
e3ee4e2
db15dcc
246b888
9b0f1d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,119 +24,107 @@ then | |
|
||
# Pre-packaged spark version: | ||
else | ||
case "$SPARK_VERSION" in | ||
case "$SPARK_VERSION" in | ||
0.7.3) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.7.3-prebuilt-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.7.3-prebuilt-cdh4.tgz | ||
fi | ||
;; | ||
0.8.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.8.0-incubating-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.8.0-incubating-bin-cdh4.tgz | ||
fi | ||
;; | ||
0.8.1) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.8.1-incubating-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.8.1-incubating-bin-cdh4.tgz | ||
fi | ||
;; | ||
0.9.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.0-incubating-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.0-incubating-bin-cdh4.tgz | ||
fi | ||
;; | ||
0.9.1) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.1-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.1-bin-cdh4.tgz | ||
fi | ||
;; | ||
0.9.2) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.2-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-0.9.2-bin-cdh4.tgz | ||
fi | ||
;; | ||
1.0.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.0-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.0-bin-cdh4.tgz | ||
fi | ||
;; | ||
1.0.1) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.1-bin-hadoop1.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.1-bin-cdh4.tgz | ||
fi | ||
;; | ||
1.0.2) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.2-bin-hadoop1.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-prebuilt-hadoop1.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-prebuilt-cdh4.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.0.2-bin-cdh4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
1.1.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.0-bin-hadoop1.tgz | ||
;; | ||
0\.8\.0|0\.8\.1|0\.9\.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-incubating-bin-hadoop1.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.0-bin-cdh4.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-incubating-bin-cdh4.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.0-bin-hadoop2.4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
1.1.1) | ||
;; | ||
# 0.9.1 - 1.0.2 | ||
0.9.1|1\.0\.[0-2]) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.1-bin-hadoop1.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop1.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.1-bin-cdh4.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-cdh4.tgz | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.1.1-bin-hadoop2.4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
1.2.0) | ||
;; | ||
# 1.1.0 - 1.3.0 | ||
1\.[1-2]\.[0-9]*|1\.3\.0) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.0-bin-hadoop1.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop1.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.0-bin-cdh4.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-cdh4.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "yarn" ]]; then | ||
if [[ "$HADOOP_MINOR_VERSION" == "2.4" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.4.tgz | ||
else | ||
echo "ERROR: Unknown Hadoop minor version" | ||
return 1 | ||
fi | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.0-bin-hadoop2.4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
1.2.1) | ||
;; | ||
# 1.3.1 - 1.6.2 | ||
1\.[3-6]\.[0-2]) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.1-bin-hadoop1.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop1.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.1-bin-cdh4.tgz | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-cdh4.tgz | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "yarn" ]]; then | ||
if [[ "$HADOOP_MINOR_VERSION" == "2.4" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.4.tgz | ||
elif [[ "$HADOOP_MINOR_VERSION" == "2.6" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.6.tgz | ||
else | ||
echo "ERROR: Unknown Hadoop minor version" | ||
return 1 | ||
fi | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-1.2.1-bin-hadoop2.4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
*) | ||
;; | ||
# 2.0.0 - 2.0.1 | ||
2\.0\.[0-1]|2\.0\.0-preview) | ||
if [[ "$HADOOP_MAJOR_VERSION" == "1" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop1.tgz | ||
echo "ERROR: Unknown Hadoop major version" | ||
return 1 | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "2" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-cdh4.tgz | ||
echo "ERROR: Unknown Hadoop major version" | ||
return 1 | ||
elif [[ "$HADOOP_MAJOR_VERSION" == "yarn" ]]; then | ||
if [[ "$HADOOP_MINOR_VERSION" == "2.4" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.4.tgz | ||
elif [[ "$HADOOP_MINOR_VERSION" == "2.6" ]]; then | ||
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. What about hadoop-2.7 here ? Was it left out as only > 2.0.0 supports hadoop 2.7 ? In that case I think we can have two big case statements -- one for spark major versions < 2.0 and one for major version >= 2.0 ? FWIW the main goal is to avoid making this file too long 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. it was to cover 1.4 - 1.6.2 so no hadoop 2.7 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. would be happy to rewrite, though. 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. Yeah I was thinking that we could write two big case statements one to handle 1.x and the other to handle 2.x (we can add sub-case statements within them for specific 1.x quirks etc.) |
||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.6.tgz | ||
elif [[ "$HADOOP_MINOR_VERSION" == "2.7" ]]; then | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.7.tgz | ||
else | ||
echo "ERROR: Unknown Hadoop version" | ||
return 1 | ||
fi | ||
else | ||
wget http://s3.amazonaws.com/spark-related-packages/spark-$SPARK_VERSION-bin-hadoop2.4.tgz | ||
echo "ERROR: Unsupported Hadoop major version" | ||
return 1 | ||
fi | ||
;; | ||
*) | ||
if [ $? != 0 ]; then | ||
echo "ERROR: Unknown Spark version" | ||
return -1 | ||
return 1 | ||
fi | ||
esac | ||
;; | ||
esac | ||
|
||
echo "Unpacking Spark" | ||
tar xvzf spark-*.tgz > /tmp/spark-ec2_spark.log | ||
|
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.
I'm not sure we need a scala installation on the cluster anymore as Spark should just work with a JRE. But it seems fine to have this if people find it useful
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.
never tried spark without scala. even spark-shell does not need scala?
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.
Yes - recent Spark distribution includes the scala libraries that provide the shell and other support. But since this is a useful thing irrespective lets keep this.