carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1376: [CARBONDATA-1505] Get the detailed blocklet i...
Date Thu, 28 Sep 2017 06:34:17 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1376#discussion_r141535661
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
---
    @@ -78,8 +89,55 @@ public DataMapWriter createWriter(String segmentId) {
                 new TableBlockIndexUniqueIdentifier(identifier, segmentId, listFiles[i].getName()));
           }
         }
    +    return tableBlockIndexUniqueIdentifiers;
    +  }
     
    -    return cache.getAll(tableBlockIndexUniqueIdentifiers);
    +  /**
    +   * Get the blocklet detail information based on blockletid, blockid and segmentid.
This method is
    +   * exclusively for BlockletDataMapFactory as detail information is only available in
this default
    +   * datamap.
    +   */
    +  @Override
    +  public List<ExtendedBlocklet> getDetailedBlocklets(List<Blocklet> blocklets,
String segmentId)
    +      throws IOException {
    +    List<ExtendedBlocklet> detailedBlocklets = new ArrayList<>();
    +    // If it is already detailed blocklet then type cast and return same
    +    if (blocklets.size() > 0 && blocklets.get(0) instanceof ExtendedBlocklet)
{
    +      for (Blocklet blocklet : blocklets) {
    +        detailedBlocklets.add((ExtendedBlocklet) blocklet);
    +      }
    +      return detailedBlocklets;
    +    }
    +    List<TableBlockIndexUniqueIdentifier> identifiers =
    +        getTableBlockIndexUniqueIdentifiers(segmentId);
    +    // Retrieve each blocklets detail information from blocklet datamap
    +    for (Blocklet blocklet : blocklets) {
    +      detailedBlocklets.add(getDetailedBlocklet(identifiers, blocklet));
    +    }
    +    return detailedBlocklets;
    +  }
    +
    +  @Override
    +  public ExtendedBlocklet getDetailedBlocklet(Blocklet blocklet, String segmentId)
    --- End diff --
    
    ok


---

Mime
View raw message