carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From manishgupt...@apache.org
Subject carbondata git commit: [CARBONDATA-1439] Wrong Error message shown for Bad records even when BAD_RECORDS_LOGGER_ENABLE is set to true
Date Thu, 21 Dec 2017 08:42:08 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 425f820bd -> 0c0f90ca7


[CARBONDATA-1439] Wrong Error message shown for Bad records even when BAD_RECORDS_LOGGER_ENABLE
is set to true

Correct the error message for bad records scenario when BAD_RECORDS_LOGGER_ENABLE is set to
true.

This closes #1311


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

Branch: refs/heads/master
Commit: 0c0f90ca7f8353c38e5641dee476456286c36b76
Parents: 425f820
Author: shivangi <shivangi.gupta@knoldus.in>
Authored: Fri Aug 4 13:25:02 2017 +0530
Committer: manishgupta88 <tomanishgupta18@gmail.com>
Committed: Thu Dec 21 14:15:07 2017 +0530

----------------------------------------------------------------------
 .../processing/loading/converter/impl/RowConverterImpl.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/0c0f90ca/processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
b/processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
index 83245a3..959e4f5 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/loading/converter/impl/RowConverterImpl.java
@@ -165,8 +165,10 @@ public class RowConverterImpl implements RowConverter {
       if (!logHolder.isLogged() && logHolder.isBadRecordNotAdded()) {
         badRecordLogger.addBadRecordsToBuilder(copy.getData(), logHolder.getReason());
         if (badRecordLogger.isDataLoadFail()) {
-          String error = "Data load failed due to bad record: " + logHolder.getReason() +
-              "Please enable bad record logger to know the detail reason.";
+          String error = "Data load failed due to bad record: " + logHolder.getReason();
+          if (!badRecordLogger.isBadRecordLoggerEnable()) {
+            error += "Please enable bad record logger to know the detail reason.";
+          }
           throw new BadRecordFoundException(error);
         }
         logHolder.clear();


Mime
View raw message