Skip to content

Commit 9156a57

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5d087b4 + 8dae26f commit 9156a57

File tree

4 files changed

+47
-12
lines changed

4 files changed

+47
-12
lines changed

bin/beeline.cmd

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@echo off
2+
3+
rem
4+
rem Licensed to the Apache Software Foundation (ASF) under one or more
5+
rem contributor license agreements. See the NOTICE file distributed with
6+
rem this work for additional information regarding copyright ownership.
7+
rem The ASF licenses this file to You under the Apache License, Version 2.0
8+
rem (the "License"); you may not use this file except in compliance with
9+
rem the License. You may obtain a copy of the License at
10+
rem
11+
rem http://www.apache.org/licenses/LICENSE-2.0
12+
rem
13+
rem Unless required by applicable law or agreed to in writing, software
14+
rem distributed under the License is distributed on an "AS IS" BASIS,
15+
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
rem See the License for the specific language governing permissions and
17+
rem limitations under the License.
18+
rem
19+
20+
set SPARK_HOME=%~dp0..
21+
cmd /V /E /C %SPARK_HOME%\bin\spark-class.cmd org.apache.hive.beeline.BeeLine %*

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ object SparkSubmit {
281281
sysProps.getOrElseUpdate(k, v)
282282
}
283283

284+
// Ignore invalid spark.driver.host in cluster modes.
285+
if (deployMode == CLUSTER) {
286+
sysProps -= ("spark.driver.host")
287+
}
288+
284289
// Resolve paths in certain spark properties
285290
val pathConfigs = Seq(
286291
"spark.jars",

dev/create-release/create-release.sh

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ RC_NAME=${RC_NAME:-rc2}
3939
M2_REPO=~/.m2/repository
4040
SPARK_REPO=$M2_REPO/org/apache/spark
4141
NEXUS_ROOT=https://repository.apache.org/service/local/staging
42-
NEXUS_UPLOAD=$NEXUS_ROOT/deploy/maven2
4342
NEXUS_PROFILE=d63f592e7eac0 # Profile for Spark staging uploads
4443

4544
if [ -z "$JAVA_HOME" ]; then
@@ -64,19 +63,28 @@ if [[ ! "$@" =~ --package-only ]]; then
6463
# NOTE: This is done "eagerly" i.e. we don't check if we can succesfully build
6564
# or before we coin the release commit. This helps avoid races where
6665
# other people add commits to this branch while we are in the middle of building.
67-
old=" <version>${RELEASE_VERSION}-SNAPSHOT<\/version>"
68-
new=" <version>${RELEASE_VERSION}<\/version>"
69-
find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
70-
-e "s/$old/$new/" {}
66+
cur_ver="${RELEASE_VERSION}-SNAPSHOT"
67+
rel_ver="${RELEASE_VERSION}"
68+
next_ver="${NEXT_VERSION}-SNAPSHOT"
69+
70+
old="^\( \{2,4\}\)<version>${cur_ver}<\/version>$"
71+
new="\1<version>${rel_ver}<\/version>"
72+
find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
73+
-e "s/${old}/${new}/" {}
74+
find . -name package.scala | grep -v dev | xargs -I {} sed -i \
75+
-e "s/${old}/${new}/" {}
76+
7177
git commit -a -m "Preparing Spark release $GIT_TAG"
7278
echo "Creating tag $GIT_TAG at the head of $GIT_BRANCH"
7379
git tag $GIT_TAG
7480

75-
old=" <version>${RELEASE_VERSION}<\/version>"
76-
new=" <version>${NEXT_VERSION}-SNAPSHOT<\/version>"
77-
find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
81+
old="^\( \{2,4\}\)<version>${rel_ver}<\/version>$"
82+
new="\1<version>${next_ver}<\/version>"
83+
find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
7884
-e "s/$old/$new/" {}
79-
git commit -a -m "Preparing development version ${NEXT_VERSION}-SNAPSHOT"
85+
find . -name package.scala | grep -v dev | xargs -I {} sed -i \
86+
-e "s/${old}/${new}/" {}
87+
git commit -a -m "Preparing development version $next_ver"
8088
git push origin $GIT_TAG
8189
git push origin HEAD:$GIT_BRANCH
8290
git checkout -f $GIT_TAG
@@ -118,12 +126,13 @@ if [[ ! "$@" =~ --package-only ]]; then
118126
gpg --print-md SHA1 $file > $file.sha1
119127
done
120128

121-
echo "Uplading files to $NEXUS_UPLOAD"
129+
nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id
130+
echo "Uplading files to $nexus_upload"
122131
for file in $(find . -type f)
123132
do
124133
# strip leading ./
125134
file_short=$(echo $file | sed -e "s/\.\///")
126-
dest_url="$NEXUS_UPLOAD/org/apache/spark/$file_short"
135+
dest_url="$nexus_upload/org/apache/spark/$file_short"
127136
echo " Uploading $file_short"
128137
curl -u $ASF_USERNAME:$ASF_PASSWORD --upload-file $file_short $dest_url
129138
done

yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMasterArguments.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ApplicationMasterArguments(val args: Array[String]) {
3636

3737
var args = inputArgs
3838

39-
while (! args.isEmpty) {
39+
while (!args.isEmpty) {
4040
// --num-workers, --worker-memory, and --worker-cores are deprecated since 1.0,
4141
// the properties with executor in their names are preferred.
4242
args match {

0 commit comments

Comments
 (0)