[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.

GitBox
KanakaKumar commented on a change in pull request #3262: [CARBONDATA-3415] Merge index is not working for partition table. Merge index for partition table is taking significantly longer time than normal table.
URL: https://github.com/apache/carbondata/pull/3262#discussion_r293295541
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/metadata/SegmentFileStore.java
 ##########
 @@ -89,13 +98,25 @@ public static void writeSegmentFile(String tablePath, final String taskNo, Strin
     CarbonFile tempFolder =
         FileFactory.getCarbonFile(location + CarbonCommonConstants.FILE_SEPARATOR + tempFolderLoc);
 
-    if (tempFolder.exists() && partionNames.size() > 0) {
-      CarbonFile[] carbonFiles = tempFolder.listFiles(new CarbonFileFilter() {
-        @Override public boolean accept(CarbonFile file) {
-          return file.getName().startsWith(taskNo) && file.getName()
-              .endsWith(CarbonTablePath.INDEX_FILE_EXT);
-        }
-      });
+    if ((tempFolder.exists() && partionNames.size() > 0) || (isMergeIndexFlow
+        && partionNames.size() > 0)) {
+      CarbonFile[] carbonFiles = null;
+      if (isMergeIndexFlow) {
 
 Review comment:
   Can we simply this logic with just flag of mergeindex outside and decide what folder to list.
   Listing index& merge index both files is not a problem  for loading.

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