prashantwason commented on a change in pull request #2819:
URL: https://github.com/apache/hudi/pull/2819#discussion_r617958581
##########
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:
@ssdong DateFimeFormatter is a good suggestion. But its format() method
does not take a Date() but takes a TemporalAccessory (i.e.e LocalDateTime,
etc). So the amount of changes would still be significant.
@vinothchandar Yeah, we can work without thread local
What do you both think of this idea?
1. Change COMMIT_FORMATER to be DateFimeFormatter but make it private
2. Introduce a new method
HoodieActiveTimeline.format(time_in_msec)
--
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]