You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by zhengruifeng <gi...@git.apache.org> on 2016/03/18 13:01:41 UTC

[GitHub] spark pull request: [Minor][Core] Add nonEmpty to RDD and JavaRDD

GitHub user zhengruifeng opened a pull request:

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

    [Minor][Core] Add nonEmpty to RDD and JavaRDD

    ## What changes were proposed in this pull request?
    add nonEmpty method to RDD and JavaRDD.
    It may be more convenient to use nonEmpty method in some cases.
    
    
    ## How was this patch tested?
    manual tests
    
    


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

    $ git pull https://github.com/zhengruifeng/spark nonEmpty

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

    https://github.com/apache/spark/pull/11823.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 #11823
    
----
commit c5d2fe4a2f3dc0f0c7a35b12717f45662da78957
Author: Zheng RuiFeng <ru...@foxmail.com>
Date:   2016-03-18T11:54:55Z

    create nonEmpty

commit aacf2660073193e8da3bf27e3f1875c576da7efe
Author: Zheng RuiFeng <ru...@foxmail.com>
Date:   2016-03-18T11:59:58Z

    fix style

----


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#issuecomment-198326621
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53536/
    Test FAILed.


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#discussion_r56649468
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -1386,6 +1386,12 @@ abstract class RDD[T: ClassTag](
       }
     
       /**
    +   * @return false if and only if the RDD contains no elements at all. Note that an RDD
    +   *         may be empty even when it has at least 1 partition.
    +   */
    +  def nonEmpty(): Boolean = !isEmpty()
    --- End diff --
    
    ok, I will close it. but I think it may be useful to add some methods like nonEmpty/takeRight...


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#issuecomment-198326620
  
    Merged build finished. Test FAILed.


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#issuecomment-198326602
  
    **[Test build #53536 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53536/consoleFull)** for PR 11823 at commit [`aacf266`](https://github.com/apache/spark/commit/aacf2660073193e8da3bf27e3f1875c576da7efe).
     * This patch **fails MiMa 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 pull request: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#issuecomment-198324788
  
    **[Test build #53536 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53536/consoleFull)** for PR 11823 at commit [`aacf266`](https://github.com/apache/spark/commit/aacf2660073193e8da3bf27e3f1875c576da7efe).


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

    https://github.com/apache/spark/pull/11823#discussion_r56649180
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -1386,6 +1386,12 @@ abstract class RDD[T: ClassTag](
       }
     
       /**
    +   * @return false if and only if the RDD contains no elements at all. Note that an RDD
    +   *         may be empty even when it has at least 1 partition.
    +   */
    +  def nonEmpty(): Boolean = !isEmpty()
    --- End diff --
    
    This isn't worth adding. I know Scala has both.
    An API change would certainly need a JIRA, but this should be closed.


---
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: [Minor][Core] Add nonEmpty to RDD and JavaRDD

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

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


---
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