Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2907#discussion_r231778046
--- Diff:
core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java ---
@@ -951,27 +951,46 @@ public void print() {
return compactionSize;
}
- /**
- * Number of cores should be used while loading data.
- *
- * @return
- */
- public int getNumberOfCores() {
+ public int getNumberOfCores(String key) {
int numberOfCores;
try {
numberOfCores = Integer.parseInt(
CarbonProperties.getInstance().getProperty(
- CarbonCommonConstants.NUM_CORES_LOADING,
+ key,
CarbonCommonConstants.NUM_CORES_DEFAULT_VAL));
} catch (NumberFormatException exc) {
- LOGGER.warn("Configured value for property " +
CarbonCommonConstants.NUM_CORES_LOADING
+ LOGGER.warn("Configured value for property " + key
+ " is wrong. Falling back to the default value "
+ CarbonCommonConstants.NUM_CORES_DEFAULT_VAL);
numberOfCores =
Integer.parseInt(CarbonCommonConstants.NUM_CORES_DEFAULT_VAL);
}
return numberOfCores;
}
+ /**
+ * Number of cores should be used while loading data.
+ * @return
--- End diff --
we can just remove the @return for the following three methods
---