marchpure commented on a change in pull request #3799:
URL: https://github.com/apache/carbondata/pull/3799#discussion_r443450793



##########
File path: 
core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -1903,6 +1903,30 @@ public static Long getInputMetricsInterval() {
     }
   }
 
+  /**
+   * Validate and get the input metrics interval
+   *
+   * @return input metrics interval
+   */
+  public static Long getInsertStageTimeout() {
+    String timeout = CarbonProperties.getInstance()
+            .getProperty(CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT);
+    if (timeout == null) {
+      return CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT_DEFAULT;
+    } else {
+      try {
+        long configuredValue = Long.parseLong(timeout);
+        if (configuredValue < 0) {
+          return CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT_DEFAULT;
+        } else {
+          return configuredValue;
+        }
+      } catch (Exception ex) {

Review comment:
       modified

##########
File path: 
core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -1903,6 +1903,30 @@ public static Long getInputMetricsInterval() {
     }
   }
 
+  /**
+   * Validate and get the input metrics interval
+   *
+   * @return input metrics interval
+   */
+  public static Long getInsertStageTimeout() {
+    String timeout = CarbonProperties.getInstance()
+            .getProperty(CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT);
+    if (timeout == null) {
+      return CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT_DEFAULT;
+    } else {
+      try {
+        long configuredValue = Long.parseLong(timeout);
+        if (configuredValue < 0) {
+          return CarbonCommonConstants.CARBON_INSERT_STAGE_TIMEOUT_DEFAULT;

Review comment:
       modified




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to