You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tdas <gi...@git.apache.org> on 2017/07/19 01:34:40 UTC

[GitHub] spark pull request #18678: [SPARK-21464][SS] Minimize deprecation warnings c...

GitHub user tdas opened a pull request:

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

    [SPARK-21464][SS] Minimize deprecation warnings caused by ProcessingTime class

    ## What changes were proposed in this pull request?
    
    Use of `ProcessingTime` class was deprecated in favor of `Trigger.ProcessingTime` in Spark 2.2. However interval uses to ProcessingTime causes deprecation warnings during compilation. This cannot be avoided entirely as even though it is deprecated as a public API, ProcessingTime instances are used internally in TriggerExecutor. This PR is to minimize the warning by removing its uses from tests as much as possible.
    
    ## How was this patch tested?
    Existing tests.

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

    $ git pull https://github.com/tdas/spark SPARK-21464

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

    https://github.com/apache/spark/pull/18678.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 #18678
    
----
commit 41d550f599afba023ede3e8a4f8e5af910e440b9
Author: Tathagata Das <ta...@gmail.com>
Date:   2017-07-19T01:21:51Z

    Minimized usage of ProcessingTime class

----


---
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 #18678: [SPARK-21464][SS] Minimize deprecation warnings caused b...

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

    https://github.com/apache/spark/pull/18678
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/79735/
    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 #18678: [SPARK-21464][SS] Minimize deprecation warnings caused b...

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

    https://github.com/apache/spark/pull/18678
  
    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 #18678: [SPARK-21464][SS] Minimize deprecation warnings caused b...

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

    https://github.com/apache/spark/pull/18678
  
    **[Test build #79735 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79735/testReport)** for PR 18678 at commit [`41d550f`](https://github.com/apache/spark/commit/41d550f599afba023ede3e8a4f8e5af910e440b9).
     * 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 pull request #18678: [SPARK-21464][SS] Minimize deprecation warnings c...

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

    https://github.com/apache/spark/pull/18678#discussion_r128135329
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/ProcessingTimeSuite.scala ---
    @@ -22,20 +22,22 @@ import java.util.concurrent.TimeUnit
     import scala.concurrent.duration._
     
     import org.apache.spark.SparkFunSuite
    -import org.apache.spark.sql.streaming.ProcessingTime
    +import org.apache.spark.sql.streaming.{ProcessingTime, Trigger}
     
     class ProcessingTimeSuite extends SparkFunSuite {
     
       test("create") {
    -    assert(ProcessingTime(10.seconds).intervalMs === 10 * 1000)
    -    assert(ProcessingTime.create(10, TimeUnit.SECONDS).intervalMs === 10 * 1000)
    -    assert(ProcessingTime("1 minute").intervalMs === 60 * 1000)
    -    assert(ProcessingTime("interval 1 minute").intervalMs === 60 * 1000)
    -
    -    intercept[IllegalArgumentException] { ProcessingTime(null: String) }
    -    intercept[IllegalArgumentException] { ProcessingTime("") }
    -    intercept[IllegalArgumentException] { ProcessingTime("invalid") }
    -    intercept[IllegalArgumentException] { ProcessingTime("1 month") }
    -    intercept[IllegalArgumentException] { ProcessingTime("1 year") }
    +    def getIntervalMs(trigger: Trigger): Long = trigger.asInstanceOf[ProcessingTime].intervalMs
    --- End diff --
    
    Reduced 10 lines of deprecation warning to 1 line.


---
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 #18678: [SPARK-21464][SS] Minimize deprecation warnings caused b...

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

    https://github.com/apache/spark/pull/18678
  
    **[Test build #79735 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/79735/testReport)** for PR 18678 at commit [`41d550f`](https://github.com/apache/spark/commit/41d550f599afba023ede3e8a4f8e5af910e440b9).


---
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 #18678: [SPARK-21464][SS] Minimize deprecation warnings caused b...

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

    https://github.com/apache/spark/pull/18678
  
    Thanks @srowen merging to master.


---
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 #18678: [SPARK-21464][SS] Minimize deprecation warnings c...

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

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


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