Github user zhengruifeng commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11821#discussion_r56642833
  
    --- Diff: 
examples/src/main/java/org/apache/spark/examples/mllib/JavaStreamingTestExample.java
 ---
    @@ -94,22 +97,21 @@ public BinarySample call(String line) throws Exception {
         // $example off$
     
         // Stop processing if test becomes significant or we time out
    -    final Accumulator<Integer> timeoutCounter =
    -      ssc.sparkContext().accumulator(numBatchesTimeout);
    +    timeoutCounter = numBatchesTimeout;
     
         out.foreachRDD(new VoidFunction<JavaRDD<StreamingTestResult>>() {
           @Override
    -      public void call(JavaRDD<StreamingTestResult> rdd) throws Exception {
    -        timeoutCounter.add(-1);
    +      public void call(JavaRDD<StreamingTestResult> rdd) {
    +        timeoutCounter -= 1;
     
    -        long cntSignificant = rdd.filter(new Function<StreamingTestResult, 
Boolean>() {
    +        boolean anySignificant = ! rdd.filter(new 
Function<StreamingTestResult, Boolean>() {
    --- End diff --
    
    ok, the space is removed.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to