[GitHub] spark pull request #20571: [SPARK-23383][Build][Minor]Make a distribution sh...

2018-02-20 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/20571


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20571: [SPARK-23383][Build][Minor]Make a distribution sh...

2018-02-14 Thread felixcheung
Github user felixcheung commented on a diff in the pull request:

https://github.com/apache/spark/pull/20571#discussion_r168389419
  
--- Diff: dev/make-distribution.sh ---
@@ -72,9 +76,19 @@ while (( "$#" )); do
 --help)
   exit_with_usage
   ;;
-*)
+--*)
+  echo "Error: $1 is not supported, it will be ignored and not take 
effect"
+  usage
+  shift
+  continue
--- End diff --

+1 on not continue


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20571: [SPARK-23383][Build][Minor]Make a distribution sh...

2018-02-11 Thread yaooqinn
Github user yaooqinn commented on a diff in the pull request:

https://github.com/apache/spark/pull/20571#discussion_r167440294
  
--- Diff: dev/make-distribution.sh ---
@@ -72,8 +76,15 @@ while (( "$#" )); do
 --help)
   exit_with_usage
   ;;
+--*)
--- End diff --

I guess both options are ok too.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20571: [SPARK-23383][Build][Minor]Make a distribution sh...

2018-02-11 Thread srowen
Github user srowen commented on a diff in the pull request:

https://github.com/apache/spark/pull/20571#discussion_r167437130
  
--- Diff: dev/make-distribution.sh ---
@@ -72,8 +76,15 @@ while (( "$#" )); do
 --help)
   exit_with_usage
   ;;
+--*)
--- End diff --

I think this is fine. It will print usage for every unrecognized arg, but, 
that's probably OK, as it's rare to have more than one.

I guess the other option is to fail outright to make sure the user knows 
the command wasn't parsed as given. How about that? I don't feel strongly.


---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #20571: [SPARK-23383][Build][Minor]Make a distribution sh...

2018-02-10 Thread yaooqinn
GitHub user yaooqinn opened a pull request:

https://github.com/apache/spark/pull/20571

[SPARK-23383][Build][Minor]Make a distribution should exit with usage while 
detecting wrong options

## What changes were proposed in this pull request?
```shell
./dev/make-distribution.sh --name ne-1.0.0-SNAPSHOT xyz --tgz  -Phadoop-2.7
+++ dirname ./dev/make-distribution.sh
++ cd ./dev/..
++ pwd
+ SPARK_HOME=/Users/Kent/Documents/spark
+ DISTDIR=/Users/Kent/Documents/spark/dist
+ MAKE_TGZ=false
+ MAKE_PIP=false
+ MAKE_R=false
+ NAME=none
+ MVN=/Users/Kent/Documents/spark/build/mvn
+ ((  5  ))
+ case $1 in
+ NAME=ne-1.0.0-SNAPSHOT
+ shift
+ shift
+ ((  3  ))
+ case $1 in
+ break
+ '[' -z /Users/Kent/.jenv/candidates/java/current ']'
+ '[' -z /Users/Kent/.jenv/candidates/java/current ']'
++ command -v git
+ '[' /usr/local/bin/git ']'
++ git rev-parse --short HEAD
+ GITREV=98ea6a7
+ '[' '!' -z 98ea6a7 ']'
+ GITREVSTRING=' (git revision 98ea6a7)'
+ unset GITREV
++ command -v /Users/Kent/Documents/spark/build/mvn
+ '[' '!' /Users/Kent/Documents/spark/build/mvn ']'
++ /Users/Kent/Documents/spark/build/mvn help:evaluate 
-Dexpression=project.version xyz --tgz -Phadoop-2.7
++ grep -v INFO
++ tail -n 1
+ VERSION=' -X,--debug Produce execution debug 
output'
```
It is better to declare the mistakes and exit with usage than `break`

## How was this patch tested?

manually 

cc @srowen 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/yaooqinn/spark SPARK-23383

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/20571.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #20571


commit 81c1b2407ceb478d6795438de82ac6afe65024c8
Author: Kent Yao 
Date:   2018-02-11T03:48:30Z

exit with usage




---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org