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

    https://github.com/apache/carbondata/pull/1984#discussion_r169620760
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
 ---
    @@ -185,26 +212,27 @@ public void clear(String segmentId) {
       @Override
       public void clear() {
         for (String segmentId : segmentMap.keySet().toArray(new 
String[segmentMap.size()])) {
    -      clear(segmentId);
    +      clear(new Segment(segmentId, null));
         }
       }
     
       @Override
       public List<DataMap> getDataMaps(DataMapDistributable distributable) 
throws IOException {
         BlockletDataMapDistributable mapDistributable = 
(BlockletDataMapDistributable) distributable;
         List<TableBlockIndexUniqueIdentifier> identifiers = new ArrayList<>();
    -    if 
(mapDistributable.getFilePath().endsWith(CarbonTablePath.INDEX_FILE_EXT)) {
    -      identifiers.add(new TableBlockIndexUniqueIdentifier(identifier, 
distributable.getSegmentId(),
    -          mapDistributable.getFilePath()));
    -    } else if 
(mapDistributable.getFilePath().endsWith(CarbonTablePath.MERGE_INDEX_FILE_EXT)) 
{
    +    String indexPath = mapDistributable.getFilePath();
    +    if (indexPath.endsWith(CarbonTablePath.INDEX_FILE_EXT)) {
    +      String parent = indexPath.substring(0, indexPath.lastIndexOf("/"));
    --- End diff --
    
    Ok, I have changed to HDFS Path and get parent from it.


---

Reply via email to