File tree Expand file tree Collapse file tree 3 files changed +37
-4
lines changed
streaming/src/main/scala/org/apache/spark/streaming Expand file tree Collapse file tree 3 files changed +37
-4
lines changed Original file line number Diff line number Diff line change @@ -513,7 +513,12 @@ class StreamingContext private[streaming] (
513513 /**
514514 * :: DeveloperApi ::
515515 *
516- * Return the current state of the context.
516+ * Return the current state of the context. The context can be in three possible states -
517+ * - StreamingContextState.INTIALIZED - The context has been created, but not been started yet.
518+ * Input DStreams, transformations and output operations can be created on the context.
519+ * - StreamingContextState.STARTED - The context has been started, and been not stopped.
520+ * Input DStreams, transformations and output operations cannot be created on the context.
521+ * - StreamingContextState.STOPPED - The context has been stopped and cannot be used any more.
517522 */
518523 @ DeveloperApi
519524 def getState (): StreamingContextState = {
Original file line number Diff line number Diff line change 2222/**
2323 * :: DeveloperApi ::
2424 *
25- * Represents the state of the StreamingContext.
25+ * Represents the state of a StreamingContext.
2626 */
2727@ DeveloperApi
2828public enum StreamingContextState {
29- INITIALIZED , STARTED , STOPPED
29+ /**
30+ * The context has been created, but not been started yet.
31+ * Input DStreams, transformations and output operations can be created on the context.
32+ */
33+ INITIALIZED ,
34+
35+ /**
36+ * The context has been started, and been not stopped.
37+ * Input DStreams, transformations and output operations cannot be created on the context.
38+ */
39+ STARTED ,
40+
41+ /**
42+ * The context has been stopped and cannot be used any more.
43+ */
44+ STOPPED
3045}
Original file line number Diff line number Diff line change @@ -581,7 +581,20 @@ class JavaStreamingContext(val ssc: StreamingContext) extends Closeable {
581581 /**
582582 * :: DeveloperApi ::
583583 *
584- * Return the current state of the context.
584+ * Return the current state of the context. The context can be in three possible states -
585+ * <ul>
586+ * <li>
587+ * StreamingContextState.INTIALIZED - The context has been created, but not been started yet.
588+ * Input DStreams, transformations and output operations can be created on the context.
589+ * </li>
590+ * <li>
591+ * StreamingContextState.STARTED - The context has been started, and been not stopped.
592+ * Input DStreams, transformations and output operations cannot be created on the context.
593+ * </li>
594+ * <li>
595+ * StreamingContextState.STOPPED - The context has been stopped and cannot be used any more.
596+ * </li>
597+ * </ul>
585598 */
586599 def getState (): StreamingContextState = {
587600 ssc.getState()
You can’t perform that action at this time.
0 commit comments