You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/01/22 02:02:01 UTC

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

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:
users@infra.apache.org


With regards,
Apache Git Services