MaxGekk commented on a change in pull request #27732: [SPARK-30984][SS]Add UI
test for Structured Streaming UI
URL: https://github.com/apache/spark/pull/27732#discussion_r387069903
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/UIUtils.scala
##########
@@ -57,4 +62,16 @@ private[ui] object UIUtils {
query.exception.map(_ => "FAILED").getOrElse("FINISHED")
}
}
+
+ private val progressTimestampFormat = new ThreadLocal[SimpleDateFormat]() {
+ override def initialValue(): SimpleDateFormat = {
+ val format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") //
ISO8601
+ format.setTimeZone(getTimeZone("UTC"))
Review comment:
This is useless settings because you require a time zone in the inputs:
```scala
scala> val sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")
sdf: java.text.SimpleDateFormat = java.text.SimpleDateFormat@5af7aed5
scala> sdf.parse
parse parseObject
scala> sdf.parse("2020-03-03T11:12:13.123")
java.text.ParseException: Unparseable date: "2020-03-03T11:12:13.123"
at java.text.DateFormat.parse(DateFormat.java:366)
... 47 elided
scala> sdf.parse("2020-03-03T11:12:13.123Z")
res1: java.util.Date = Tue Mar 03 11:12:13 MSK 2020
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]