You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by lw-lin <gi...@git.apache.org> on 2016/07/19 06:12:52 UTC

[GitHub] spark pull request #14256: [SPARK-16620][CORE] Add back tokenization process...

GitHub user lw-lin opened a pull request:

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

    [SPARK-16620][CORE] Add back tokenization process in RDD.pipe(command: String)

    ## What changes were proposed in this pull request?
    
    Currently `RDD.pipe(command: String)`:
    - works only with a single command with no option specified, such as `RDD.pipe("wc")`
    - does not work when command is specified with some options, such as `RDD.pipe("wc -l")`
    
    This is a regression from Spark 1.6.
    
    This patch adds back tokenization process in RDD.pipe(command: String).
    
    ## How was this patch tested?
    Added a test which would pass in 1.6, would fail prior to this patch, and would pass after this patch.

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

    $ git pull https://github.com/lw-lin/spark rdd-pipe

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

    https://github.com/apache/spark/pull/14256.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 #14256
    
----
commit 85174658b5392b5fd9773a89ee7b24a3db08c334
Author: Liwei Lin <lw...@gmail.com>
Date:   2016-07-19T05:34:46Z

    Fix pipe(command) & pipe(command, env)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    I'm going to merge this in order to unblock the next 2.0 RC.
    
    Merging in master/2.0.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    Oh indeed this change does implement exactly that, because it now calls the main overload with default args. LGTM, and this was the original intent of the earlier commit. I don't think the Java version needs any change.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    Hi, @lw-lin . This seems to resolve SPARK-16613 , too. Could you check that? If possible, please add SPARK-16613 into the title, too. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    **[Test build #62508 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62508/consoleFull)** for PR 14256 at commit [`8517465`](https://github.com/apache/spark/commit/85174658b5392b5fd9773a89ee7b24a3db08c334).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    @srowen @dongjoon-hyun, thanks for the clarification. Yep I had verified manually that the java version does not need any change before I opened this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14256: [SPARK-16620][CORE] Add back the tokenization pro...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    **[Test build #62508 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/62508/consoleFull)** for PR 14256 at commit [`8517465`](https://github.com/apache/spark/commit/85174658b5392b5fd9773a89ee7b24a3db08c334).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    See also https://github.com/apache/spark/pull/14260


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request #14256: [SPARK-16620][CORE] Add back the tokenization pro...

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

    https://github.com/apache/spark/pull/14256#discussion_r71316160
  
    --- Diff: core/src/test/scala/org/apache/spark/rdd/PipedRDDSuite.scala ---
    @@ -51,6 +51,22 @@ class PipedRDDSuite extends SparkFunSuite with SharedSparkContext {
         }
       }
     
    +  test("basic pipe with tokenization") {
    +    if (testCommandAvailable("wc")) {
    +      val nums = sc.makeRDD(Array(1, 2, 3, 4), 2)
    +
    +      // verify that both RDD.pipe(command: String) and RDD.pipe(command: String, env) work good
    +      for (piped <- Seq(nums.pipe("wc -l"), nums.pipe("wc -l", Map[String, String]()))) {
    --- End diff --
    
    You know, we actually had no tests testing `pipe(String)`! This is one.
    Feel free to add even the most basic tests exercising this method as it would have caught the underlying error that caused the infinite recursion.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark issue #14256: [SPARK-16620][CORE] Add back the tokenization process in...

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

    https://github.com/apache/spark/pull/14256
  
    SPARK-16613 is different I believe.
    
    You reported a `StackOverflowError` and indeed I can't figure out why the existing `pipe` methods just call themselves? It happened in https://github.com/apache/spark/commit/279bd4aa5fddbabdb0383a3f6f0fc8d91780e092 and unless I totally miss something that's just a small but bad error. They need to call to the main `pipe` overload.
    
    The cleanup to `PipedRDD` constructors also lost the `tokenize` call. These simpler `pipe` overloads do need to invoke it.
    
    This is certainly my fault as I was reviewing and suggested some cleanup that ultimately led to losing this functionality.
    
    (Also I don't really like using `StringTokenizer` instead of just splitting on whitespace, but, maybe not the thing to deal with now.)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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