You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by HyukjinKwon <gi...@git.apache.org> on 2018/11/01 09:04:23 UTC

[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Revive -i option in spark-sh...

GitHub user HyukjinKwon opened a pull request:

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

    [SPARK-25906][SHELL] Revive -i option in spark-shell

    ## What changes were proposed in this pull request?
    
    Looks we mistakenly removed `-i` option at `spark-shell`. This PR targets to restore the previous option and behaviour.
    
    The root cause seems to be https://github.com/scala/scala/commit/99dad60d984d3f72338f3bad4c4fe905090edd51. They change what `-i` means in that commit. `-i` option is replaced to `-I`.
    
    The _newly replaced_ option -i at Scala 2.11.12 works like `:paste` (previously it worked like `:load`). `:paste` looks not working so far - at least I verified Spark 2.4.0, 2.3.2, 2.0.0, and the current master:
    
    ```
    scala> :paste test.scala
    Pasting file test.scala...
    <console>:19: error: value toDF is not a member of org.apache.spark.rdd.RDD[Record]
    Error occurred in an application involving default arguments.
           spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
                                                                                   ^
    ```
    
    Note that `./bin/spark-shell --help` does not describe this option so I guess it's not explicitly documented (I guess?); however, it's best not to break. The changes are only two lines.
    
    ## How was this patch tested?
    
    Manually tested.
    
    
    With the input below:
    
    ```
    $ cat test.scala
    spark.version
    case class Record(key: Int, value: String)
    spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
    ```
    
    **Spark 2.3.2:**
    
    ```scala
    $ bin/spark-shell -i test.scala
    ...
    +---+-----+
    |key|value|
    +---+-----+
    |  1|val_1|
    |  2|val_2|
    +---+-----+
    ```
    
    **Before:**
    
    ```scala
    $ bin/spark-shell -i test.scala
    ...
    test.scala:17: error: value toDF is not a member of org.apache.spark.rdd.RDD[Record]
    Error occurred in an application involving default arguments.
           spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
    ```
    
    **After:**
    
    ```scala
    ./bin/spark-shell -i test.scala
    ...
    +---+-----+
    |key|value|
    +---+-----+
    |  1|val_1|
    |  2|val_2|
    +---+-----+
    ```


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

    $ git pull https://github.com/HyukjinKwon/spark SPARK-25906

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

    https://github.com/apache/spark/pull/22919.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 #22919
    
----
commit 17b3c6c5ad4a39b1ecfd33111c392de47c6df967
Author: hyukjinkwon <gu...@...>
Date:   2018-11-01T08:53:39Z

    Revive -i option in spark-shell

----


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230701471
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    Yea .. but `-i` doesn't handle implicits like toDF or symbols which are pretty basic ones. I think we should better avoid to document it for now.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon closed the pull request at:

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


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    True. but it's a bit difficult to say it's a downside because `-i` has a quite major issue as described above - user's code suddenly does not work with implicit method (like symbol `'id` or `.toDF` which are pretty common) in minor release bumpup. Also, looks the only reason why changed `:load` to `:paste` in `-i` option is a bug (SI-7898).
    
    For documentation, I can mention we can use Scala shell flags. Looks @cloud-fan is going to leave this JIRA as a known issue so I guess we are good. Maybe I can leave an additional note in migration guide as well if we're not going ahead to fix it.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230554256
  
    --- Diff: bin/spark-shell2.cmd ---
    @@ -20,7 +20,13 @@ rem
     rem Figure out where the Spark framework is installed
     call "%~dp0find-spark-home.cmd"
     
    -set _SPARK_CMD_USAGE=Usage: .\bin\spark-shell.cmd [options]
    +set LF=^
    +
    +
    +rem two empty lines are required
    +set _SPARK_CMD_USAGE=Usage: .\bin\spark-shell.cmd [options]^%LF%%LF%^%LF%%LF%^
    +Scala REPL options:^%LF%%LF%^
    --- End diff --
    
    There seems no claver way then this to set newlines in variables in batch files.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Should be ready for a review.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    **[Test build #98425 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/98425/testReport)** for PR 22919 at commit [`5f3cb87`](https://github.com/apache/spark/commit/5f3cb87c8798e72cc6852e71c02ffc2077c748d7).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Note that some commands like `:replay` wouldn't work as well if `-i` option is given in the shell since `:paste` itself looks not working. This PR also fixes it.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
GitHub user HyukjinKwon reopened a pull request:

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

    [SPARK-25906][SHELL] Documents '-I' option (from Scala REPL) in spark-shell

    ## What changes were proposed in this pull request?
    
    Looks we mistakenly changed `-i` option behaviour at `spark-shell`. This PR targets to restore the previous option and behaviour.
    
    The root cause seems to be https://github.com/scala/scala/commit/99dad60d984d3f72338f3bad4c4fe905090edd51. They change what `-i` means in that commit. `-i` option is replaced to `-I`.
    
    The _newly replaced_ option -i at Scala 2.11.12 works like `:paste` (previously it worked like `:load`). `:paste` looks not working with implicits - at least I verified Spark 2.4.0, 2.3.2, 2.0.0, and the current master:
    
    ```bash
    scala> :paste test.scala
    Pasting file test.scala...
    <console>:19: error: value toDF is not a member of org.apache.spark.rdd.RDD[Record]
    Error occurred in an application involving default arguments.
           spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
                                                                                   ^
    ```
    
    Note that `./bin/spark-shell --help` does not describe this option so I guess it's not explicitly documented (I guess?); however, it's best not to break. The changes are only two lines.
    
    In particular, we should backport this to branch-2.4.
    
    ## How was this patch tested?
    
    Manually tested.
    
    
    With the input below:
    
    ```bash
    $ cat test.scala
    spark.version
    case class Record(key: Int, value: String)
    spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
    ```
    
    **Spark 2.3.2:**
    
    ```scala
    $ bin/spark-shell -i test.scala
    ...
    +---+-----+
    |key|value|
    +---+-----+
    |  1|val_1|
    |  2|val_2|
    +---+-----+
    ```
    
    **Before:**
    
    ```scala
    $ bin/spark-shell -i test.scala
    ...
    test.scala:17: error: value toDF is not a member of org.apache.spark.rdd.RDD[Record]
    Error occurred in an application involving default arguments.
           spark.sparkContext.parallelize((1 to 2).map(i => Record(i, s"val_$i"))).toDF.show
                                                                                   ^
    ```
    
    **After:**
    
    ```scala
    $ ./bin/spark-shell -i test.scala
    ...
    +---+-----+
    |key|value|
    +---+-----+
    |  1|val_1|
    |  2|val_2|
    +---+-----+
    ```


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

    $ git pull https://github.com/HyukjinKwon/spark SPARK-25906

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

    https://github.com/apache/spark/pull/22919.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 #22919
    
----
commit 5f3cb87c8798e72cc6852e71c02ffc2077c748d7
Author: hyukjinkwon <gu...@...>
Date:   2018-11-03T12:48:25Z

    Documents '-I' option (from Scala REPL) in spark-shell

----


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230554455
  
    --- Diff: bin/spark-shell2.cmd ---
    @@ -20,7 +20,13 @@ rem
     rem Figure out where the Spark framework is installed
     call "%~dp0find-spark-home.cmd"
     
    -set _SPARK_CMD_USAGE=Usage: .\bin\spark-shell.cmd [options]
    +set LF=^
    +
    +
    +rem two empty lines are required
    +set _SPARK_CMD_USAGE=Usage: .\bin\spark-shell.cmd [options]^%LF%%LF%^%LF%%LF%^
    +Scala REPL options:^%LF%%LF%^
    --- End diff --
    
    Script specific information looks included in `_SPARK_CMD_USAGE` - looks it's appropriate place then somewhere in `SparkSubmitArguments.printUsageAndExit`.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/98425/
    Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Yup. That's what I thought. and treat them as same


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    cc @felixcheung as well. This is similar code path with https://github.com/apache/zeppelin/pull/3206


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    +1 for @HyukjinKwon 's opinion .


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    **[Test build #98350 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/98350/testReport)** for PR 22919 at commit [`17b3c6c`](https://github.com/apache/spark/commit/17b3c6c5ad4a39b1ecfd33111c392de47c6df967).


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Let me go ahead with documenting one then tomorrow.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230686892
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    I mean, I didn't find
    ```
    Options:
      --master MASTER_URL         spark://host:port, mesos://host:port, yarn,
                                  k8s://https://host:port, or local (Default: local[*]).
      --deploy-mode DEPLOY_MODE   Whether to launch the driver program locally ("client") or
                                  on one of the worker machines inside the cluster ("cluster")
                                  (Default: client).
    ```
    
    in the shell script. Where do we define them?


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    so we would support both `-i` and `-I` in 2.4?


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    personally I think Spark Shell should be consistent with the upstream Scala Shell, otherwise we may get another ticket complaining why we didn't follow...


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230655513
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    where do we define other options?


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revive -i option in spark-shell

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    cc @dbtsai, @dongjoon-hyun, @gatorsmile and @cloud-fan 


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    I was actually thinking that hard about that. My conclusion was that basically we should but `spark-shell` is a Spark entry point where we make a release - so I thought it's better to keep it in 2.4.0.
    
    In 3.0.0, actually I think we should disallow both `-i` and `-I` like `pyspark` or `sparkr` shell (we allowed file before but not anymore).


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    hmm, I think this follows previous behavior, but I'm wondering should we follow scala REPL to replace `-i` with `-I`?


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by dbtsai <gi...@git.apache.org>.
Github user dbtsai commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    I'm also on @cloud-fan's side---we should keep it consistent with the upstream Scala Shell. However, we should document it on `./bin/spark-shell --help`, so when a user complains or files a ticket, we can refer them to the doc. Thanks.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Let me get this in to master and branch-2.4 in few days if there are no more comments.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Also, the difference introduced between `-i` and `-I` sounds rather a bug fix ([SI-7898](https://issues.scala-lang.org/browse/SI-7898)), which already exists in previous shell. I ended up with thinking that it might be more important that end users upgrade Spark and face such issues than syncing it to Scala 2.11.12 shell at Spark 2.4.x.
    
    I don't superduper strongly feel about it but it was my conclusion. I will defer to guys here about going ahead in this way or not.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    **[Test build #98350 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/98350/testReport)** for PR 22919 at commit [`17b3c6c`](https://github.com/apache/spark/commit/17b3c6c5ad4a39b1ecfd33111c392de47c6df967).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Note that `python` shell also takes file but `pyspark` shell doesn't:
    
    ```
    $ cat tmp.py
    print "a"
    ```
    
    ```
    $ python2 tmp.py
    a
    ```
    
    ```
    $ ./bin/pyspark tmp.py
    Running python applications through 'pyspark' is not supported as of Spark 2.0.
    Use ./bin/spark-submit <python file>
    
    ```


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230675018
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    I tested other options and this one looks only the valid one. I described in PR description.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/98350/
    Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    This is weird. The most obvious downside is that there's no way to get the new `-i` functionality in case anyone needs it. A blurb in `--help` or even a release note explaining the changed behavior would be good enough, I think.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    That's exactly what I initially thought. At least we could in 3.0.0 but I think we should keep it at 2.4.x.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4738/
    Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Merged to master and branch-2.4.


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Revives '-i' option in spark-shell

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4692/
    Test PASSed.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Documents '-I' option (from Scala R...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    **[Test build #98425 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/98425/testReport)** for PR 22919 at commit [`5f3cb87`](https://github.com/apache/spark/commit/5f3cb87c8798e72cc6852e71c02ffc2077c748d7).


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by srowen <gi...@git.apache.org>.
Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Tough call. At least it's worth documenting that this behavior changed because so did the Scala shell's behavior, and I'd support that. I'd also support supporting both, if there's no real downside to that option?


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by viirya <gi...@git.apache.org>.
Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230695150
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    Shall we also define `-i` behavior here? I think for now this option is also accepted by the REPL.


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Thabks, @dbtsai. Also adding @vanzin and @srowen wdyt about -i options at 2.4.x and 3.0.0?


---

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


[GitHub] spark pull request #22919: [SPARK-25906][SHELL] Documents '-I' option (from ...

Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22919#discussion_r230689462
  
    --- Diff: bin/spark-shell ---
    @@ -32,7 +32,10 @@ if [ -z "${SPARK_HOME}" ]; then
       source "$(dirname "$0")"/find-spark-home
     fi
     
    -export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]"
    +export _SPARK_CMD_USAGE="Usage: ./bin/spark-shell [options]
    +
    +Scala REPL options:
    +  -I <file>                   preload <file>, enforcing line-by-line interpretation"
    --- End diff --
    
    Oh haha. Sorry. That's in `SparkSubmitArguments.printUsageAndExit`.thats why I left https://github.com/apache/spark/pull/22919#discussion_r230554455


---

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


[GitHub] spark issue #22919: [SPARK-25906][SHELL] Restores '-i' option's behaviour in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/22919
  
    Thanks, @dbtsai . That sounds reasonable and helpful, too. 


---

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