Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2313#discussion_r189166315
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentUpdateStatusManager.java
 ---
    @@ -348,32 +348,37 @@ public boolean isBlockValid(String segName, String 
blockName) {
       private List<String> getFilePaths(CarbonFile blockDir, final String 
blockNameFromTuple,
           final String extension, List<String> deleteFileList, final long 
deltaStartTimestamp,
           final long deltaEndTimeStamp) {
    -    CarbonFile[] files = blockDir.getParentFile().listFiles(new 
CarbonFileFilter() {
    -
    -      @Override public boolean accept(CarbonFile pathName) {
    -        String fileName = pathName.getName();
    -        if (fileName.endsWith(extension) && pathName.getSize() > 0) {
    -          String firstPart = fileName.substring(0, fileName.indexOf('.'));
    -          String blockName =
    -              firstPart.substring(0, 
firstPart.lastIndexOf(CarbonCommonConstants.HYPHEN));
    -          long timestamp = Long.parseLong(firstPart
    -              
.substring(firstPart.lastIndexOf(CarbonCommonConstants.HYPHEN) + 1,
    -                  firstPart.length()));
    -          if (blockNameFromTuple.equals(blockName) && (
    -              (Long.compare(timestamp, deltaEndTimeStamp) <= 0) && (
    -                  Long.compare(timestamp, deltaStartTimestamp) >= 0))) {
    -            return true;
    +    if (null != blockDir.getParentFile()) {
    --- End diff --
    
    ParentFile not present should through IOException.


---

Reply via email to