nsivabalan commented on code in PR #8631:
URL: https://github.com/apache/hudi/pull/8631#discussion_r1187089107


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/clean/CleanPlanner.java:
##########
@@ -510,7 +510,7 @@ public Option<HoodieInstant> getEarliestCommitToRetain() {
       }
     } else if (config.getCleanerPolicy() == 
HoodieCleaningPolicy.KEEP_LATEST_BY_HOURS) {
       Instant instant = Instant.now();
-      ZonedDateTime currentDateTime = ZonedDateTime.ofInstant(instant, 
ZoneId.systemDefault());
+      ZonedDateTime currentDateTime = ZonedDateTime.ofInstant(instant, 
HoodieInstantTimeGenerator.getTimelineTimeZone().getZoneId());
       String earliestTimeToRetain = 
HoodieActiveTimeline.formatDate(Date.from(currentDateTime.minusHours(hoursRetained).toInstant()));

Review Comment:
   I see the issue. may be we should not set any default value for 
commitTimeZone in HoodieInstantTimeGenerator. we can set it to null infact. And 
so unless the table properties are instantiation whcih in turn will call into 
setCommitTimeZone, if any other callers tries to access the commit time zone, 
will fail fast. 
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to