SPARK-3470 [CORE] [STREAMING] Add Closeable / close() to Java context objects#2346
SPARK-3470 [CORE] [STREAMING] Add Closeable / close() to Java context objects#2346srowen wants to merge 1 commit intoapache:masterfrom
Conversation
|
QA tests have started for PR 2346 at commit
|
|
The relevant PR: #991 |
|
QA tests have finished for PR 2346 at commit
|
|
since spark targets java 7 & 8, why not just use the correct AutoCloseable? |
|
It doesn't target Java 7: https://github.com/apache/spark/blob/master/pom.xml#L113 |
you're right. i hope it becomes java 7+ and we can move to AutoCloseable |
|
|
|
would like a unit test, but lgtm |
|
Yup, LGTM |
There was a problem hiding this comment.
note two space indent here, but don't worry i will fix it.
|
@srowen any reason you did not add this to the Scala SparkContext? |
|
@rxin (Yeah wasn't sure how to handle the continuation indent, feel free to change it.) I didn't add it to |
... that expose a stop() lifecycle method. This doesn't add
AutoCloseable, which is Java 7+ only. But it should be possible to use try-with-resources on aCloseablein Java 7, as long as theclose()does not throw a checked exception, and these don't. Q.E.D.