clownxc commented on code in PR #8659: URL: https://github.com/apache/hudi/pull/8659#discussion_r1190155373
########## hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java: ########## @@ -144,4 +144,10 @@ public static boolean isValidInstantTime(String instantTime) { return false; } } + + private static ZoneId getZoneId() { + return commitTimeZone.equals(HoodieTimelineTimeZone.LOCAL) + ? ZoneId.systemDefault() Review Comment: > If possible, fetch the timezone whout metaClient.tableConfig, the `HoodieTimelineTimeZone` can not assure the initialization of zoneId. In the class `HoodieInstantTimeGenerator`, set an initial value( `HoodieTimelineTimeZone.LOCAL` ) for the property `commitTimeZone` ```java private static HoodieTimelineTimeZone commitTimeZone = HoodieTimelineTimeZone.LOCAL; ``` And update `commitTimeZone` value in `HoodieTableConfig#create` ```java if (hoodieConfig.contains(TIMELINE_TIMEZONE)) { HoodieInstantTimeGenerator.setCommitTimeZone(HoodieTimelineTimeZone.valueOf(hoodieConfig.getString(TIMELINE_TIMEZONE))); } ``` ```java public static void setCommitTimeZone(HoodieTimelineTimeZone commitTimeZone) { HoodieInstantTimeGenerator.commitTimeZone = commitTimeZone; } ``` So, I think getting ZoneId by HoodieTimelineTimeZone should be correct. and I don't really understand the meaning of `the HoodieTimelineTimeZone can not assure the initialization of zoneId`. I don't know if my idea is correct, looking forward to your reply. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org