Skip to content

Commit 8de17d2

Browse files
committed
Minor change
1 parent 9a2e941 commit 8de17d2

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

sql/core/src/main/scala/org/apache/spark/sql/streaming/progress.scala

+20-22
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,27 @@ import org.json4s.JsonDSL._
3030
import org.json4s.jackson.JsonMethods._
3131

3232
import org.apache.spark.annotation.Experimental
33-
import org.apache.spark.sql.catalyst.util.DateTimeUtils
3433

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+
}
3554
/**
3655
* :: Experimental ::
3756
* Information about progress made in the execution of a [[StreamingQuery]] during
@@ -184,24 +203,3 @@ class SinkProgress protected[sql](
184203
("description" -> JString(description))
185204
}
186205
}
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

Comments
 (0)