Skip to content

Commit 2b86ba1

Browse files
committed
Added scala docs.
1 parent 1722433 commit 2b86ba1

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

streaming/src/main/scala/org/apache/spark/streaming/StreamingContextState.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ class StreamingContextState private (enumValue: Int) {
4646
*/
4747
@DeveloperApi
4848
object StreamingContextState {
49+
/** State representing that the StreamingContext has been initialized and ready for setup */
4950
val INITIALIZED = new StreamingContextState(0)
51+
52+
/** State representing that the StreamingContext has been started after setting it up */
5053
val STARTED = new StreamingContextState(1)
54+
55+
/** State representing that the StreamingContext has been stopped and cannot be used any more*/
5156
val STOPPED = new StreamingContextState(2)
5257
}

streaming/src/main/scala/org/apache/spark/streaming/api/java/JavaStreamingContext.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,9 @@ class JavaStreamingContext(val ssc: StreamingContext) extends Closeable {
579579
}
580580

581581

582+
/**
583+
* Return the current state of the context.
584+
*/
582585
def getState(): StreamingContextState = {
583586
ssc.getState()
584587
}

0 commit comments

Comments
 (0)