dhatchayani commented on a change in pull request #3191: [CARBONDATA-3360]fix 
NullPointerException in delete and clean files operation
URL: https://github.com/apache/carbondata/pull/3191#discussion_r279189846
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/mutate/CarbonUpdateUtil.java
 ##########
 @@ -683,6 +683,31 @@ private static boolean compareTimestampsAndDelete(
               
CarbonTablePath.DataFileUtil.getTimeStampFromFileName(invalidFile.getName()));
     }
 
+    // This check is because, when there are some invalid files like 
tableStatusUpdate.write files
+    // present in store [[which can happen during delete or update if the disk 
is full or hdfs quota
+    // is finished]] then fileTimestamp will be null, in that case check for 
max query out and
+    // delete the .write file after timeout
+    if (fileTimestamp == null) {
+      String tableUpdateStatusFilename = invalidFile.getName();
+      if (tableUpdateStatusFilename.endsWith(".write")) {
+        long tableUpdateStatusFileTimeStamp = 
Long.parseLong(tableUpdateStatusFilename
 
 Review comment:
   Please use 
   
org.apache.carbondata.core.util.path.CarbonTablePath.DataFileUtil#getTimeStampFromFileName
   to get the timestamp from the file name

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to