carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kumarvisha...@apache.org
Subject [1/2] carbondata git commit: [CARBONDATA-1733] While load is in progress, Show segments is throwing NPE
Date Thu, 16 Nov 2017 15:18:19 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 808a334f0 -> 6551620b2


[CARBONDATA-1733] While load is in progress, Show segments is throwing NPE


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

Branch: refs/heads/master
Commit: aff3b9e4c033ac736de4888195a85906ebd61b13
Parents: 808a334
Author: dhatchayani <dhatcha.official@gmail.com>
Authored: Thu Nov 16 16:15:38 2017 +0530
Committer: kumarvishal <kumarvishal.1802@gmail.com>
Committed: Thu Nov 16 20:47:01 2017 +0530

----------------------------------------------------------------------
 .../carbondata/core/statusmanager/LoadMetadataDetails.java       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/aff3b9e4/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
b/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
index f42ca23..d838e2e 100644
--- a/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
+++ b/core/src/main/java/org/apache/carbondata/core/statusmanager/LoadMetadataDetails.java
@@ -202,6 +202,10 @@ public class LoadMetadataDetails implements Serializable {
       LOGGER.error("Cannot convert" + factTimeStamp + " to Time/Long type value" + e.getMessage());
       parser = new SimpleDateFormat(CarbonCommonConstants.CARBON_TIMESTAMP);
       try {
+        // if the load is in progress, factTimeStamp will be null, so use current time
+        if (null == factTimeStamp) {
+          return System.currentTimeMillis();
+        }
         dateToStr = parser.parse(factTimeStamp);
         return dateToStr.getTime();
       } catch (ParseException e1) {


Mime
View raw message