carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <>
Subject [GitHub] incubator-carbondata pull request #659: [CARBONDATA-781] Store one SegmentPr...
Date Tue, 11 Apr 2017 03:45:36 GMT
Github user jackylk commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/carbondata/core/datastore/
    @@ -338,14 +339,28 @@ private synchronized Object addAndGetSegmentLock(String segmentId)
        * @throws IOException
       private AbstractIndex loadBlocks(TaskBucketHolder taskBucketHolder,
    -      List<TableBlockInfo> tableBlockInfoList, AbsoluteTableIdentifier tableIdentifier)
    +      List<TableBlockInfo> tableBlockInfoList, AbsoluteTableIdentifier tableIdentifier,
    +      TableSegmentUniqueIdentifier tableSegmentUniqueIdentifier)
           throws IOException {
         // all the block of one task id will be loaded together
         // so creating a list which will have all the data file meta data to of one task
         List<DataFileFooter> footerList = CarbonUtil
             .readCarbonIndexFile(taskBucketHolder.taskNo, taskBucketHolder.bucketNumber,
                 tableBlockInfoList, tableIdentifier);
    -    AbstractIndex segment = new SegmentTaskIndex();
    +    if (null == tableSegmentUniqueIdentifier.getSegmentProperties()) {
    +      // create a metadata details
    +      // this will be useful in query handling
    +      // all the data file metadata will have common segment properties we
    +      // can use first one to get create the segment properties
    +      SegmentProperties segmentProperties =
    +          new SegmentProperties(footerList.get(0).getColumnInTable(),
    --- End diff --
    I think the hashmap approach is OK. You can keep a hashmap in this class and store the
mapping from a key (calculated from schema) to the SegmentProperties object.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message