diff options
author | Sean Owen <sowen@cloudera.com> | 2016-07-30 04:42:38 -0700 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-07-30 04:42:38 -0700 |
commit | 0dc4310b470c7e4355c0da67ca3373c3013cc9dd (patch) | |
tree | 9a8ac5aefbb25188958e9ae028c7ffdc117b705a /streaming/src/test/scala/org | |
parent | bbc247548ac6faeca15afc05c266cee37ef13416 (diff) | |
download | spark-0dc4310b470c7e4355c0da67ca3373c3013cc9dd.tar.gz spark-0dc4310b470c7e4355c0da67ca3373c3013cc9dd.tar.bz2 spark-0dc4310b470c7e4355c0da67ca3373c3013cc9dd.zip |
[SPARK-16694][CORE] Use for/foreach rather than map for Unit expressions whose side effects are required
## What changes were proposed in this pull request?
Use foreach/for instead of map where operation requires execution of body, not actually defining a transformation
## How was this patch tested?
Jenkins
Author: Sean Owen <sowen@cloudera.com>
Closes #14332 from srowen/SPARK-16694.
Diffstat (limited to 'streaming/src/test/scala/org')
-rw-r--r-- | streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala index 6763ac64da..0349e11224 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala @@ -34,7 +34,7 @@ class ReceiverInputDStreamSuite extends TestSuiteBase with BeforeAndAfterAll { override def afterAll(): Unit = { try { - StreamingContext.getActive().map { _.stop() } + StreamingContext.getActive().foreach(_.stop()) } finally { super.afterAll() } |