[GitHub] qiuchenjian commented on a change in pull request #3090: [CARBONDATA-3262] Fix merge index failure handling for compacted segment

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

[GitHub] qiuchenjian commented on a change in pull request #3090: [CARBONDATA-3262] Fix merge index failure handling for compacted segment

GitBox
qiuchenjian commented on a change in pull request #3090: [CARBONDATA-3262] Fix merge index failure handling for compacted segment
URL: https://github.com/apache/carbondata/pull/3090#discussion_r249620685
 
 

 ##########
 File path: integration/spark-common/src/main/scala/org/apache/spark/rdd/CarbonMergeFilesRDD.scala
 ##########
 @@ -124,17 +128,22 @@ class CarbonMergeFilesRDD(
       val split = theSplit.asInstanceOf[CarbonMergeFilePartition]
       logInfo("Merging carbon index files of segment : " +
               CarbonTablePath.getSegmentPath(tablePath, split.segmentId))
-
-      if (isHivePartitionedTable) {
-        CarbonLoaderUtil
-          .mergeIndexFilesInPartitionedSegment(carbonTable, split.segmentId,
-            segmentFileNameToSegmentIdMap.get(split.segmentId))
-      } else {
-        new CarbonIndexFileMergeWriter(carbonTable)
-          .mergeCarbonIndexFilesOfSegment(split.segmentId,
-            tablePath,
-            readFileFooterFromCarbonDataFile,
-            segmentFileNameToSegmentIdMap.get(split.segmentId))
+      try {
+        if (isHivePartitionedTable) {
+          CarbonLoaderUtil
+            .mergeIndexFilesInPartitionedSegment(carbonTable, split.segmentId,
+              segmentFileNameToSegmentIdMap.get(split.segmentId))
+        } else {
+          new CarbonIndexFileMergeWriter(carbonTable)
+            .mergeCarbonIndexFilesOfSegment(split.segmentId,
+              tablePath,
+              readFileFooterFromCarbonDataFile,
+              segmentFileNameToSegmentIdMap.get(split.segmentId))
+        }
+      } catch {
+        case e: Exception =>
+          LOGGER.warn(s"Failed to merge index files for ${ carbonTable.getTableUniqueName }. " +
 
 Review comment:
   why the log level is warn, if the index merge failed, the unmerged index files also affect normally?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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