vinothchandar commented on a change in pull request #2819:
URL: https://github.com/apache/hudi/pull/2819#discussion_r629798021
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieActiveTimeline.java
##########
@@ -73,6 +71,16 @@
private static final Logger LOG =
LogManager.getLogger(HoodieActiveTimeline.class);
protected HoodieTableMetaClient metaClient;
private static AtomicReference<String> lastInstantTime = new
AtomicReference<>(String.valueOf(Integer.MIN_VALUE));
+ private static ThreadLocal<SimpleDateFormat> commitFormatHolder = new
ThreadLocal<SimpleDateFormat>() {
Review comment:
yes. we can make a `LocalDate` from `Date` easily.
(https://www.baeldung.com/java-date-to-localdate-and-localdatetime)
+1 on the new static method. In fact, we can even have a separate class
`HoodieInstantTimeGenerator` and keep an singleton instance in
HoodieActiveTimeline. We can then add methods to `HoodieInstantTimeGenerator`
as needed, to support date, ms etc.
--
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]