Repository: carbondata
Updated Branches:
  refs/heads/master 13cdeb9f4 -> f1d84646a


[CARBONDATA-2316] Executor task is failed but UI shows success issue is fixed

Executor task is failed but UI shows success issue is fixed for compaction

This closes #2142


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/f1d84646
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/f1d84646
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/f1d84646

Branch: refs/heads/master
Commit: f1d84646a50ab6e47310419947d5045c767f2b75
Parents: 13cdeb9
Author: rahulforallp <rahul.ku...@knoldus.in>
Authored: Fri Apr 6 14:16:06 2018 +0530
Committer: manishgupta88 <tomanishgupt...@gmail.com>
Committed: Wed Apr 11 18:19:01 2018 +0530

----------------------------------------------------------------------
 .../org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala     | 2 +-
 .../carbondata/processing/merger/AbstractResultProcessor.java | 2 +-
 .../processing/merger/CompactionResultSortProcessor.java      | 6 +++---
 .../processing/merger/RowResultMergerProcessor.java           | 7 +++----
 4 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/f1d84646/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
----------------------------------------------------------------------
diff --git 
a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
 
b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
index b4c5e4d..6cf8cb3 100644
--- 
a/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
+++ 
b/integration/spark-common/src/main/scala/org/apache/carbondata/spark/rdd/CarbonMergerRDD.scala
@@ -225,7 +225,7 @@ class CarbonMergerRDD[K, V](
 
       } catch {
         case e: Exception =>
-          LOGGER.error(e)
+          LOGGER.error(e, "Compaction Failed ")
           throw e
       }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f1d84646/processing/src/main/java/org/apache/carbondata/processing/merger/AbstractResultProcessor.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/processing/merger/AbstractResultProcessor.java
 
b/processing/src/main/java/org/apache/carbondata/processing/merger/AbstractResultProcessor.java
index 3f46a24..7a11c8b 100644
--- 
a/processing/src/main/java/org/apache/carbondata/processing/merger/AbstractResultProcessor.java
+++ 
b/processing/src/main/java/org/apache/carbondata/processing/merger/AbstractResultProcessor.java
@@ -37,7 +37,7 @@ public abstract class AbstractResultProcessor {
    * @param resultIteratorList
    * @return
    */
-  public abstract boolean execute(List<RawResultIterator> resultIteratorList);
+  public abstract boolean execute(List<RawResultIterator> resultIteratorList) 
throws Exception;
 
   /**
    * This method will be sued to clean up the resources and close all the 
spawned threads to avoid

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f1d84646/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
 
b/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
index 850ceca..dd8f739 100644
--- 
a/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
+++ 
b/processing/src/main/java/org/apache/carbondata/processing/merger/CompactionResultSortProcessor.java
@@ -150,7 +150,7 @@ public class CompactionResultSortProcessor extends 
AbstractResultProcessor {
    *
    * @param resultIteratorList
    */
-  public boolean execute(List<RawResultIterator> resultIteratorList) {
+  public boolean execute(List<RawResultIterator> resultIteratorList) throws 
Exception {
     boolean isCompactionSuccess = false;
     try {
       initTempStoreLocation();
@@ -166,7 +166,7 @@ public class CompactionResultSortProcessor extends 
AbstractResultProcessor {
       }
       isCompactionSuccess = true;
     } catch (Exception e) {
-      LOGGER.error(e, "Compaction failed: " + e.getMessage());
+      throw e;
     } finally {
       if (partitionSpec != null) {
         try {
@@ -175,8 +175,8 @@ public class CompactionResultSortProcessor extends 
AbstractResultProcessor {
                   partitionSpec.getLocation().toString(), 
carbonLoadModel.getFactTimeStamp() + "",
                   partitionSpec.getPartitions());
         } catch (IOException e) {
-          LOGGER.error(e, "Compaction failed: " + e.getMessage());
           isCompactionSuccess = false;
+          throw e;
         }
       }
       // clear temp files and folders created during compaction

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f1d84646/processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
----------------------------------------------------------------------
diff --git 
a/processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
 
b/processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
index 0430fd3..64e8b1e 100644
--- 
a/processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
+++ 
b/processing/src/main/java/org/apache/carbondata/processing/merger/RowResultMergerProcessor.java
@@ -97,7 +97,7 @@ public class RowResultMergerProcessor extends 
AbstractResultProcessor {
    * Merge function
    *
    */
-  public boolean execute(List<RawResultIterator> resultIteratorList) {
+  public boolean execute(List<RawResultIterator> resultIteratorList) throws 
Exception {
     initRecordHolderHeap(resultIteratorList);
     boolean mergeStatus = false;
     int index = 0;
@@ -158,9 +158,8 @@ public class RowResultMergerProcessor extends 
AbstractResultProcessor {
       }
       mergeStatus = true;
     } catch (Exception e) {
-      LOGGER.error(e, e.getMessage());
-      LOGGER.error("Exception in compaction merger " + e.getMessage());
       mergeStatus = false;
+      throw e;
     } finally {
       try {
         if (isDataPresent) {
@@ -172,8 +171,8 @@ public class RowResultMergerProcessor extends 
AbstractResultProcessor {
               partitionSpec.getPartitions());
         }
       } catch (CarbonDataWriterException | IOException e) {
-        LOGGER.error(e, "Exception in compaction merger");
         mergeStatus = false;
+        throw e;
       }
     }
 

Reply via email to