Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
str-janus committed Dec 4, 2014
2 parents 5d087b4 + 8dae26f commit 9156a57
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 12 deletions.
21 changes: 21 additions & 0 deletions bin/beeline.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off

rem
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements. See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License. You may obtain a copy of the License at
rem
rem http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.
rem

set SPARK_HOME=%~dp0..
cmd /V /E /C %SPARK_HOME%\bin\spark-class.cmd org.apache.hive.beeline.BeeLine %*
5 changes: 5 additions & 0 deletions core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ object SparkSubmit {
sysProps.getOrElseUpdate(k, v)
}

// Ignore invalid spark.driver.host in cluster modes.
if (deployMode == CLUSTER) {
sysProps -= ("spark.driver.host")
}

// Resolve paths in certain spark properties
val pathConfigs = Seq(
"spark.jars",
Expand Down
31 changes: 20 additions & 11 deletions dev/create-release/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ RC_NAME=${RC_NAME:-rc2}
M2_REPO=~/.m2/repository
SPARK_REPO=$M2_REPO/org/apache/spark
NEXUS_ROOT=https://repository.apache.org/service/local/staging
NEXUS_UPLOAD=$NEXUS_ROOT/deploy/maven2
NEXUS_PROFILE=d63f592e7eac0 # Profile for Spark staging uploads

if [ -z "$JAVA_HOME" ]; then
Expand All @@ -64,19 +63,28 @@ if [[ ! "$@" =~ --package-only ]]; then
# NOTE: This is done "eagerly" i.e. we don't check if we can succesfully build
# or before we coin the release commit. This helps avoid races where
# other people add commits to this branch while we are in the middle of building.
old=" <version>${RELEASE_VERSION}-SNAPSHOT<\/version>"
new=" <version>${RELEASE_VERSION}<\/version>"
find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
-e "s/$old/$new/" {}
cur_ver="${RELEASE_VERSION}-SNAPSHOT"
rel_ver="${RELEASE_VERSION}"
next_ver="${NEXT_VERSION}-SNAPSHOT"

old="^\( \{2,4\}\)<version>${cur_ver}<\/version>$"
new="\1<version>${rel_ver}<\/version>"
find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
-e "s/${old}/${new}/" {}
find . -name package.scala | grep -v dev | xargs -I {} sed -i \
-e "s/${old}/${new}/" {}

git commit -a -m "Preparing Spark release $GIT_TAG"
echo "Creating tag $GIT_TAG at the head of $GIT_BRANCH"
git tag $GIT_TAG

old=" <version>${RELEASE_VERSION}<\/version>"
new=" <version>${NEXT_VERSION}-SNAPSHOT<\/version>"
find . -name pom.xml -o -name package.scala | grep -v dev | xargs -I {} sed -i \
old="^\( \{2,4\}\)<version>${rel_ver}<\/version>$"
new="\1<version>${next_ver}<\/version>"
find . -name pom.xml | grep -v dev | xargs -I {} sed -i \
-e "s/$old/$new/" {}
git commit -a -m "Preparing development version ${NEXT_VERSION}-SNAPSHOT"
find . -name package.scala | grep -v dev | xargs -I {} sed -i \
-e "s/${old}/${new}/" {}
git commit -a -m "Preparing development version $next_ver"
git push origin $GIT_TAG
git push origin HEAD:$GIT_BRANCH
git checkout -f $GIT_TAG
Expand Down Expand Up @@ -118,12 +126,13 @@ if [[ ! "$@" =~ --package-only ]]; then
gpg --print-md SHA1 $file > $file.sha1
done

echo "Uplading files to $NEXUS_UPLOAD"
nexus_upload=$NEXUS_ROOT/deployByRepositoryId/$staged_repo_id
echo "Uplading files to $nexus_upload"
for file in $(find . -type f)
do
# strip leading ./
file_short=$(echo $file | sed -e "s/\.\///")
dest_url="$NEXUS_UPLOAD/org/apache/spark/$file_short"
dest_url="$nexus_upload/org/apache/spark/$file_short"
echo " Uploading $file_short"
curl -u $ASF_USERNAME:$ASF_PASSWORD --upload-file $file_short $dest_url
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ApplicationMasterArguments(val args: Array[String]) {

var args = inputArgs

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

0 comments on commit 9156a57

Please sign in to comment.