Skip to content

Commit 2817552

Browse files
authored
Removes without-hadoop dist and publishes dist tgz to the same location as the pom (apache-spark-on-k8s#233)
1 parent 105e1b6 commit 2817552

File tree

7 files changed

+27
-195
lines changed

7 files changed

+27
-195
lines changed

dev/lint-java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
2121
SPARK_ROOT_DIR="$(dirname $SCRIPT_DIR)"
2222

23-
ERRORS=$($SCRIPT_DIR/../build/mvn -Pkubernetes -Pkinesis-asl -Pmesos -Pyarn -Phive -Phive-thriftserver checkstyle:check | grep ERROR)
23+
ERRORS=$($SCRIPT_DIR/../build/mvn -Phadoop-cloud -Pkubernetes -Pkinesis-asl -Pmesos -Pyarn -Phive -Phive-thriftserver checkstyle:check | grep ERROR)
2424

2525
if test ! -z "$ERRORS"; then
2626
echo -e "Checkstyle checks failed at following occurrences:\n$ERRORS"

dev/make-distribution.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ fi
142142
echo "Spark version is $VERSION"
143143
VERSION_SET=$("$MVN" versions:set -DnewVersion=$VERSION | tail -n 1)
144144
if [ "$MAKE_TGZ" == "true" ]; then
145-
echo "Making spark-dist-$VERSION-$NAME.tgz"
145+
echo "Making spark-dist_2.11-$NAME-$VERSION.tgz"
146146
else
147147
echo "Making distribution for Spark $VERSION in '$DISTDIR'..."
148148
fi

dev/publish-local.sh

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,26 @@
11
#!/usr/bin/env bash
22

33
set -euo pipefail
4-
VERSION=$(git describe --tags)
5-
HADOOP_VERSION=$(./build/mvn help:evaluate -Phadoop-palantir -Dexpression=hadoop.version 2>/dev/null\
6-
| grep -v "INFO"\
7-
| tail -n 1)
8-
4+
version=$(git describe --tags)
95

106
PALANTIR_FLAGS=(-Phadoop-cloud -Phadoop-palantir -Pkinesis-asl -Pkubernetes -Phive -Pyarn -Psparkr)
117

128
MVN_LOCAL="~/.m2/repository"
139

1410
publish_artifacts() {
15-
./build/mvn versions:set -DnewVersion=$VERSION
11+
./build/mvn versions:set -DnewVersion=$version
1612
./build/mvn -DskipTests "${PALANTIR_FLAGS[@]}" install clean
1713
}
1814

1915
make_dist() {
20-
dist_name="$1"
21-
build_flags="$2"
22-
shift 2
23-
dist_version="${VERSION}-${dist_name}"
24-
file_name="spark-dist-${dist_version}.tgz"
25-
./dev/make-distribution.sh --name $dist_name --tgz "$@" $build_flags
26-
mkdir -p $MVN_LOCAL/org/apache/spark/spark-dist/${dist_version} && \
27-
cp $file_name $MVN_LOCAL/org/apache/spark/spark-dist/${dist_version}/
16+
build_flags="$1"
17+
shift 1
18+
artifact_name="spark-dist_2.11-hadoop-palantir"
19+
file_name="${artifact_name}-${version}.tgz"
20+
./dev/make-distribution.sh --name "hadoop-palantir" --tgz "$@" $build_flags
21+
mkdir -p $MVN_LOCAL/org/apache/spark/${artifact_name}/${version} && \
22+
cp $file_name $MVN_LOCAL/org/apache/spark/${artifact_name}/${version}/
2823
}
2924

3025
publish_artifacts
31-
make_dist hadoop-$HADOOP_VERSION "${PALANTIR_FLAGS[*]}"
26+
make_dist "${PALANTIR_FLAGS[*]}"

dev/publish.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ publish_artifacts() {
1717
}
1818

1919
make_dist() {
20-
dist_name="$1"
21-
build_flags="$2"
22-
shift 2
23-
dist_version="${version}-${dist_name}"
24-
file_name="spark-dist-${dist_version}.tgz"
25-
./dev/make-distribution.sh --name $dist_name --tgz "$@" $build_flags
26-
curl -u $BINTRAY_USERNAME:$BINTRAY_PASSWORD -T $file_name "https://api.bintray.com/content/palantir/releases/spark/${version}/org/apache/spark/spark-dist/${dist_version}/${file_name}"
20+
build_flags="$1"
21+
shift 1
22+
artifact_name="spark-dist_2.11-hadoop-palantir"
23+
file_name="${artifact_name}-${version}.tgz"
24+
./dev/make-distribution.sh --name "hadoop-palantir" --tgz "$@" $build_flags
25+
curl -u $BINTRAY_USERNAME:$BINTRAY_PASSWORD -T $file_name "https://api.bintray.com/content/palantir/releases/spark/${version}/org/apache/spark/${artifact_name}/${version}/${file_name}"
2726
}
2827

2928
publish_artifacts
30-
make_dist hadoop-2.8.0-palantir.8 "${PALANTIR_FLAGS[*]}" --clean
31-
make_dist without-hadoop "-Phadoop-provided -Pkubernetes -Phive -Pyarn -Psparkr" --clean
29+
make_dist "${PALANTIR_FLAGS[*]}" --clean

dev/sparktestsupport/modules.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,14 @@ def __hash__(self):
521521
sbt_test_goals=["kubernetes/test"]
522522
)
523523

524+
cloud = Module(
525+
name="hadoop-cloud",
526+
dependencies=[],
527+
source_file_regexes=["hadoop-cloud/"],
528+
build_profile_flags=["-Phadoop-cloud"],
529+
sbt_test_goals=["hadoop-cloud/test"]
530+
)
531+
524532
# The root module is a dummy module which is used to run all of the tests.
525533
# No other modules should directly depend on this module.
526534
root = Module(

dists/without-hadoop/pom.xml

Lines changed: 0 additions & 168 deletions
This file was deleted.

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
<module>external/kafka-0-10</module>
108108
<module>external/kafka-0-10-assembly</module>
109109
<module>external/kafka-0-10-sql</module>
110-
<module>dists/without-hadoop</module>
111110
<module>dists/hadoop-palantir</module>
112111
</modules>
113112

0 commit comments

Comments
 (0)