carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [01/20] incubator-carbondata git commit: [Bug]Fix the exception log about the result of checking csv header (#881)
Date Sat, 06 Aug 2016 10:00:18 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master 8552a8222 -> 65c48abef


[Bug]Fix the exception log about the result of checking csv header (#881)

[Bug]Fix the exception log about the result of checking csv header (#881)

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

Branch: refs/heads/master
Commit: f2e60332fe0cb31fa61c48749d620372269c1aae
Parents: b82a960
Author: Zhangshunyu <zhangshunyu@huawei.com>
Authored: Mon Aug 1 16:55:48 2016 +0800
Committer: david <qiangcai@qq.com>
Committed: Mon Aug 1 16:55:48 2016 +0800

----------------------------------------------------------------------
 .../org/carbondata/processing/csvload/DataGraphExecuter.java  | 7 ++++---
 .../org/carbondata/processing/csvload/GraphExecutionUtil.java | 5 ++++-
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/f2e60332/processing/src/main/java/org/carbondata/processing/csvload/DataGraphExecuter.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/carbondata/processing/csvload/DataGraphExecuter.java
b/processing/src/main/java/org/carbondata/processing/csvload/DataGraphExecuter.java
index 91f5aee..882b1a7 100644
--- a/processing/src/main/java/org/carbondata/processing/csvload/DataGraphExecuter.java
+++ b/processing/src/main/java/org/carbondata/processing/csvload/DataGraphExecuter.java
@@ -460,10 +460,11 @@ public class DataGraphExecuter {
     }
 
     if (count != columnNames.length) {
-      LOGGER.error(
-          "CSV File provided is not proper. Column names in schema and CSV header are not
same.");
+      LOGGER.error("CSV header provided in DDL is not proper." +
+          " Column names in schema and CSV header are not the same.");
       throw new DataLoadingException(DataProcessorConstants.CSV_VALIDATION_ERRROR_CODE,
-          "CSV File provided is not proper. Column names in schema and csv header are not
same.");
+          "CSV header provided in DDL is not proper. Column names in schema and CSV header
are " +
+              "not the same.");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/f2e60332/processing/src/main/java/org/carbondata/processing/csvload/GraphExecutionUtil.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/carbondata/processing/csvload/GraphExecutionUtil.java
b/processing/src/main/java/org/carbondata/processing/csvload/GraphExecutionUtil.java
index 27a1f5c..c5fd299 100644
--- a/processing/src/main/java/org/carbondata/processing/csvload/GraphExecutionUtil.java
+++ b/processing/src/main/java/org/carbondata/processing/csvload/GraphExecutionUtil.java
@@ -306,7 +306,10 @@ public final class GraphExecutionUtil {
           count++;
         }
       }
-
+      if (0 == count) {
+        LOGGER.error("There is No proper CSV file header found." +
+            " Either the ddl or the CSV file should provide CSV file header. ");
+      }
       return (count == columnNames.length);
     }
 


Mime
View raw message