@@ -30,8 +30,27 @@ import org.json4s.JsonDSL._
30
30
import org .json4s .jackson .JsonMethods ._
31
31
32
32
import org .apache .spark .annotation .Experimental
33
- import org .apache .spark .sql .catalyst .util .DateTimeUtils
34
33
34
+ /**
35
+ * :: Experimental ::
36
+ * Information about updates made to stateful operators in a [[StreamingQuery ]] during a trigger.
37
+ */
38
+ @ Experimental
39
+ class StateOperatorProgress private [sql](
40
+ val numRowsTotal : Long ,
41
+ val numRowsUpdated : Long ) {
42
+
43
+ /** The compact JSON representation of this progress. */
44
+ def json : String = compact(render(jsonValue))
45
+
46
+ /** The pretty (i.e. indented) JSON representation of this progress. */
47
+ def prettyJson : String = pretty(render(jsonValue))
48
+
49
+ private [sql] def jsonValue : JValue = {
50
+ (" numRowsTotal" -> JInt (numRowsTotal)) ~
51
+ (" numRowsUpdated" -> JInt (numRowsUpdated))
52
+ }
53
+ }
35
54
/**
36
55
* :: Experimental ::
37
56
* Information about progress made in the execution of a [[StreamingQuery ]] during
@@ -184,24 +203,3 @@ class SinkProgress protected[sql](
184
203
(" description" -> JString (description))
185
204
}
186
205
}
187
-
188
- /**
189
- * :: Experimental ::
190
- * Information about updates made to stateful operators in a [[StreamingQuery ]] during a trigger.
191
- */
192
- @ Experimental
193
- class StateOperatorProgress private [sql](
194
- val numRowsTotal : Long ,
195
- val numRowsUpdated : Long ) {
196
-
197
- /** The compact JSON representation of this progress. */
198
- def json : String = compact(render(jsonValue))
199
-
200
- /** The pretty (i.e. indented) JSON representation of this progress. */
201
- def prettyJson : String = pretty(render(jsonValue))
202
-
203
- private [sql] def jsonValue : JValue = {
204
- (" numRowsTotal" -> JInt (numRowsTotal)) ~
205
- (" numRowsUpdated" -> JInt (numRowsUpdated))
206
- }
207
- }
0 commit comments