ravipesala commented on a change in pull request #3177: 
[CARBONDATA-3337][CARBONDATA-3306] Distributed index server
URL: https://github.com/apache/carbondata/pull/3177#discussion_r279412135
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java
 ##########
 @@ -557,26 +583,36 @@ public void clearDataMaps(String tableUniqName) {
   public void clearDataMap(AbsoluteTableIdentifier identifier, String 
dataMapName) {
     CarbonTable carbonTable = getCarbonTable(identifier);
     String tableUniqueName = 
identifier.getCarbonTableIdentifier().getTableUniqueName();
-    List<TableDataMap> tableIndices = allDataMaps.get(tableUniqueName);
-    if (tableIndices != null) {
-      int i = 0;
-      for (TableDataMap tableDataMap : tableIndices) {
-        if (carbonTable != null && tableDataMap != null && dataMapName
-            
.equalsIgnoreCase(tableDataMap.getDataMapSchema().getDataMapName())) {
-          try {
-            DataMapUtil.executeDataMapJobForClearingDataMaps(carbonTable);
-            tableDataMap.clear();
-          } catch (IOException e) {
-            LOGGER.error("clear dataMap job failed", e);
-            // ignoring the exception
+    if (CarbonProperties.getInstance()
+        .isDistributedPruningEnabled(identifier.getDatabaseName(), 
identifier.getTableName())) {
+      try {
+        DataMapUtil.executeClearDataMapJob(carbonTable, 
DataMapUtil.DISTRIBUTED_JOB_NAME);
 
 Review comment:
   Better pass the dataMapName and clear only that dataMap from executor

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to