carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kumarvishal09 <...@git.apache.org>
Subject [GitHub] carbondata pull request #1435: [CARBONDATA-1626]add data size and index size...
Date Thu, 16 Nov 2017 16:04:20 GMT
Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1435#discussion_r151446545
  
    --- Diff: core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java ---
    @@ -2119,5 +2127,146 @@ public static String getNewTablePath(Path carbonTablePath,
         return parentPath.toString() + CarbonCommonConstants.FILE_SEPARATOR + carbonTableIdentifier
             .getTableName();
       }
    +
    +  /*
    +   * This method will add data size and index size into tablestatus for each segment
    +   */
    +  public static void addDataIndexSizeIntoMetaEntry(LoadMetadataDetails loadMetadataDetails,
    +      String segmentId, CarbonTable carbonTable) throws IOException {
    +    CarbonTablePath carbonTablePath =
    +        CarbonStorePath.getCarbonTablePath((carbonTable.getAbsoluteTableIdentifier()));
    +    HashMap<String, Long> dataIndexSize =
    +        FileFactory.getDataSizeAndIndexSize(carbonTablePath, segmentId);
    +    loadMetadataDetails
    +        .setDataSize(dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_DATA_SIZE).toString());
    +    loadMetadataDetails
    +        .setIndexSize(dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_INDEX_SIZE).toString());
    +  }
    +
    +  /**
    +   * This method will calculate the data size and index size for carbon table
    +   */
    +  public static HashMap<String, Long> calculateSize(CarbonTable carbonTable)
    --- End diff --
    
    Update the method signature Map<String, Long>


---

Mime
View raw message