akashrn5 commented on a change in pull request #3505: [CARBONDATA-3615]: Show metacache shows the index server index-dictionary files when data loaded after index server disabled using set command
URL:
https://github.com/apache/carbondata/pull/3505#discussion_r355898272
##########
File path: core/src/main/java/org/apache/carbondata/core/util/CarbonProperties.java
##########
@@ -1664,17 +1664,29 @@ private void validateDetailQueryBatchSize() {
public boolean isDistributedPruningEnabled(String dbName, String tableName) {
// Check if user has enabled/disabled the use of index server for the current session using
// the set command
- String configuredValue = getSessionPropertyValue(
- CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER + "." + dbName + "." + tableName);
- if (configuredValue == null) {
- // if not set in session properties then check carbon.properties for the same.
- configuredValue = getProperty(CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER);
- }
- boolean isServerEnabledByUser = Boolean.parseBoolean(configuredValue);
- if (isServerEnabledByUser) {
- LOGGER.info("Distributed Index server is enabled for " + dbName + "." + tableName);
+ String configuredValueForTable = getSessionPropertyValue(
+ CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER + "." + dbName + "." + tableName);
+ String configuredValue = getProperty(CarbonCommonConstants.CARBON_ENABLE_INDEX_SERVER);
+
+ /**
+ * Carbon.enable.index.server | carbon.enable.index.server.dbname.tablename | Output
+ * False False False
+ * False True False
+ * True False False
+ * True True True
+ * True NULL True
+ * False NULL False
+ */
+
+ if (!Boolean.parseBoolean(configuredValue)) {
Review comment:
what if user configures invalid value for the config, then parse boolean fails right
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services