jackylee-ch commented on a change in pull request #35763:
URL: https://github.com/apache/spark/pull/35763#discussion_r830505472



##########
File path: sbin/start-history-server.sh
##########
@@ -32,7 +32,7 @@ fi
 # Any changes need to be reflected there.
 CLASS="org.apache.spark.deploy.history.HistoryServer"
 
-if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
+if [[ "$*" = *--help ]] || [[ "$*" = *-h ]]; then

Review comment:
       Same with here. We actually want to check whether the args is end of 
`-h` or `--help`, 

##########
File path: dev/make-distribution.sh
##########
@@ -170,24 +170,28 @@ BUILD_COMMAND=("$MVN" clean package -DskipTests $@)
 
 # Actually build the jar
 echo -e "\nBuilding with..."
-echo -e "\$ ${BUILD_COMMAND[@]}\n"
+echo -e "\$ ${BUILD_COMMAND[*]}\n"
 
 "${BUILD_COMMAND[@]}"
 
 # Make directories
 rm -rf "$DISTDIR"
 mkdir -p "$DISTDIR/jars"
 echo "Spark $VERSION$GITREVSTRING built for Hadoop $SPARK_HADOOP_VERSION" > 
"$DISTDIR/RELEASE"
-echo "Build flags: $@" >> "$DISTDIR/RELEASE"
+echo "Build flags: $*" >> "$DISTDIR/RELEASE"
 
 # Copy jars
 cp "$SPARK_HOME"/assembly/target/scala*/jars/* "$DISTDIR/jars/"
 
 # Only create the yarn directory if the yarn artifacts were built.
-if [ -f 
"$SPARK_HOME"/common/network-yarn/target/scala*/spark-*-yarn-shuffle.jar ]; then
-  mkdir "$DISTDIR/yarn"
-  cp "$SPARK_HOME"/common/network-yarn/target/scala*/spark-*-yarn-shuffle.jar 
"$DISTDIR/yarn"
-fi
+for file in 
"$SPARK_HOME"/common/network-yarn/target/scala*/spark-*-yarn-shuffle.jar

Review comment:
       It will fall if there are multiple files matching at runtime. If we 
remove this rule, it should be tested in GA.

##########
File path: 
resource-managers/kubernetes/integration-tests/scripts/setup-integration-test-env.sh
##########
@@ -118,7 +118,7 @@ then
 
   # Build SparkR image
   tags=(${EXCLUDE_TAGS//,/ })
-  if [[ ! ${tags[@]} =~ "r" ]]; then
+  if [[ ! "${tags[*]}" =~ "r" ]]; then

Review comment:
       This is the 
[explaination](https://stackoverflow.com/questions/3348443/a-confusion-about-array-versus-array-in-the-context-of-a-bash-comple)
 for `${array[@]}` and `${array[*]}`. It seems that we always use it as 
`"${array[*]}"`, which combie array to one string.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to