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 04:41:38 UTC

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

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

 ##########
 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:
   yes if the merge index is not written then the index files would be used for scanning. This PR is just to ensure that the failure is writting merge index file should not affect the scanning or any subsequent load.

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