[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-16 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770585894



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java
##
@@ -639,6 +640,7 @@ public static PropertyBuilder withPropertyBuilder() {
 private String keyGeneratorClassProp;
 private Boolean hiveStylePartitioningEnable;
 private Boolean urlEncodePartitioning;
+private HoodieTimelineTimeZone commitTimezone;

Review comment:
   done 




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-16 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770585583



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java
##
@@ -737,6 +739,11 @@ public PropertyBuilder setUrlEncodePartitioning(Boolean 
urlEncodePartitioning) {
   return this;
 }
 
+public PropertyBuilder setCommitTimezone(HoodieTimelineTimeZone 
commitTimezone) {

Review comment:
   done




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-16 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770585680



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableMetaClient.java
##
@@ -737,6 +739,11 @@ public PropertyBuilder setUrlEncodePartitioning(Boolean 
urlEncodePartitioning) {
   return this;
 }
 
+public PropertyBuilder setCommitTimezone(HoodieTimelineTimeZone 
commitTimezone) {
+  this.commitTimezone = commitTimezone;

Review comment:
   done @leesf 




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770171502



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java
##
@@ -56,6 +58,8 @@
   // when performing comparisons such as LESS_THAN_OR_EQUAL_TO
   private static final String DEFAULT_MILLIS_EXT = "999";
 
+  private static String commitTimeZone;

Review comment:
   nice advice and had modified it @leesf 




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770172942



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java
##
@@ -167,6 +169,11 @@
   .noDefaultValue()
   .withDocumentation("Key Generator class property for the hoodie table");
 
+  public static final ConfigProperty TIMELINE_TIMEZONE = 
ConfigProperty
+  .key("hoodie.table.timeline.zone")
+  .defaultValue(HoodieTimelineZone.LOCAL)
+  .withDocumentation("Set timeline timezone type");

Review comment:
   > please describe the timezone in more detail, such as the usage.
   
   now change it to "User can set hoodie commit timeline timezone, such as utc, 
local. local is default"




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770171502



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java
##
@@ -56,6 +58,8 @@
   // when performing comparisons such as LESS_THAN_OR_EQUAL_TO
   private static final String DEFAULT_MILLIS_EXT = "999";
 
+  private static String commitTimeZone;

Review comment:
   nice advice and modify it @leesf 




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770173044



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java
##
@@ -167,6 +169,11 @@
   .noDefaultValue()
   .withDocumentation("Key Generator class property for the hoodie table");
 
+  public static final ConfigProperty TIMELINE_TIMEZONE = 
ConfigProperty
+  .key("hoodie.table.timeline.zone")
+  .defaultValue(HoodieTimelineZone.LOCAL)
+  .withDocumentation("Set timeline timezone type");

Review comment:
   > please describe the timezone in more detail, such as the usage.
   
   now change it to "User can set hoodie commit timeline timezone, such as utc, 
local. local is default"




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770172942



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java
##
@@ -167,6 +169,11 @@
   .noDefaultValue()
   .withDocumentation("Key Generator class property for the hoodie table");
 
+  public static final ConfigProperty TIMELINE_TIMEZONE = 
ConfigProperty
+  .key("hoodie.table.timeline.zone")
+  .defaultValue(HoodieTimelineZone.LOCAL)
+  .withDocumentation("Set timeline timezone type");

Review comment:
   > please describe the timezone in more detail, such as the usage.
   
   now change it to "User can set hoodie commit timeline timezone, such as utc, 
local. local is default"




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770171767



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java
##
@@ -315,6 +322,10 @@ public static void create(FileSystem fs, Path 
metadataFolder, Properties propert
 // Use the default bootstrap index class.
 hoodieConfig.setDefaultValue(BOOTSTRAP_INDEX_CLASS_NAME, 
getDefaultBootstrapIndexClass(properties));
   }
+  if (hoodieConfig.contains(TIMELINE_TIMEZONE)) {
+// set commit timeline timezone to utc

Review comment:
   done

##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieTimelineZone.java
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.model;
+
+/**
+ * Hoodie TimelineZone.
+ */
+public enum HoodieTimelineZone {

Review comment:
   done




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770171567



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieTimelineZone.java
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.common.model;
+
+/**
+ * Hoodie TimelineZone.
+ */
+public enum HoodieTimelineZone {
+  LOCAL("local"),
+  UTC("utc");
+
+  private final String timezone;
+
+  HoodieTimelineZone(String timezone) {
+this.timezone = timezone;
+  }
+
+  public String getTimezone() {

Review comment:
   done @leesf 




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




[GitHub] [hudi] xuzifu666 commented on a change in pull request #4306: [HUDI-3014] add table option to set utc timezone

2021-12-15 Thread GitBox


xuzifu666 commented on a change in pull request #4306:
URL: https://github.com/apache/hudi/pull/4306#discussion_r770171502



##
File path: 
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/HoodieInstantTimeGenerator.java
##
@@ -56,6 +58,8 @@
   // when performing comparisons such as LESS_THAN_OR_EQUAL_TO
   private static final String DEFAULT_MILLIS_EXT = "999";
 
+  private static String commitTimeZone;

Review comment:
   nice advise and modify it @leesf 




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