ajantha-bhat commented on a change in pull request #4020:
URL: https://github.com/apache/carbondata/pull/4020#discussion_r533036780



##########
File path: 
core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -998,6 +998,31 @@ public long getMajorCompactionSize() {
     return compactionSize;
   }
 
+  /**
+   * returns minor compaction size value from carbon properties or -1 if it is 
not valid or
+   * not configured
+   *
+   * @return compactionSize
+   */
+  public long getMinorCompactionSize() {
+    long compactionSize = -1;
+    try {
+      compactionSize = Long.parseLong(getProperty(
+              CarbonCommonConstants.CARBON_MINOR_COMPACTION_SIZE, "0"));
+    } catch (NumberFormatException e) {
+      LOGGER.warn("Invalid value is configured for property "
+              + CarbonCommonConstants.CARBON_MINOR_COMPACTION_SIZE + " 
considering the default"
+              + " value -1 and not considering segment Size during minor 
compaction.");
+    }
+    if (compactionSize <= 0 && compactionSize != -1) {
+      LOGGER.warn("Invalid value is configured for property "

Review comment:
       if the user configures -1, we still need to throw the exception. 
internally nothing is configured. we can keep -1 and user can remove 
tblproperty or carbon property to reset it




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