[HUDI-1794] Moved static COMMIT_FORMATTER to thread local variable as SimpleDateFormat is not thread safe. (#2819)
This commit is contained in:
@@ -218,13 +218,13 @@ class TestTimeTravelQuery extends HoodieClientTestBase {
|
||||
}
|
||||
|
||||
private def defaultDateTimeFormat(queryInstant: String): String = {
|
||||
val date = HoodieActiveTimeline.COMMIT_FORMATTER.parse(queryInstant)
|
||||
val date = HoodieActiveTimeline.parseInstantTime(queryInstant)
|
||||
val format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
format.format(date)
|
||||
}
|
||||
|
||||
private def defaultDateFormat(queryInstant: String): String = {
|
||||
val date = HoodieActiveTimeline.COMMIT_FORMATTER.parse(queryInstant)
|
||||
val date = HoodieActiveTimeline.parseInstantTime(queryInstant)
|
||||
val format = new SimpleDateFormat("yyyy-MM-dd")
|
||||
format.format(date)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user