processing/src/main/java/org/apache/carbondata/processing/util/CarbonLoaderUtil.java
/*
   * This method will add data size and index size into tablestatus for each segment. And also
   * returns the size of the segment.
   */
This method will add data size and index size into tablestatus for each segment. And also
returns the size of the segment.
This method will add data size and index size into tablestatus for each segment . And also returns the size of the segment .
public static Long addDataIndexSizeIntoMetaEntry(LoadMetadataDetails loadMetadataDetails,
      String segmentId, CarbonTable carbonTable) throws IOException {
    CarbonTablePath carbonTablePath =
        CarbonStorePath.getCarbonTablePath((carbonTable.getAbsoluteTableIdentifier()));
    Map<String, Long> dataIndexSize =
        CarbonUtil.getDataSizeAndIndexSize(carbonTablePath, segmentId);
    Long dataSize = dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_DATA_SIZE);
    loadMetadataDetails.setDataSize(String.valueOf(dataSize));
    Long indexSize = dataIndexSize.get(CarbonCommonConstants.CARBON_TOTAL_INDEX_SIZE);
    loadMetadataDetails.setIndexSize(String.valueOf(indexSize));
    return dataSize + indexSize;
  }
public static Long addDataIndexSizeIntoMetaEntry ( LoadMetadataDetails loadMetadataDetails , String segmentId , CarbonTable carbonTable ) throws IOException { CarbonTablePath carbonTablePath = CarbonStorePath . getCarbonTablePath ( ( carbonTable . getAbsoluteTableIdentifier ( ) ) ) ; Map < String , Long > dataIndexSize = CarbonUtil . getDataSizeAndIndexSize ( carbonTablePath , segmentId ) ; Long dataSize = dataIndexSize . get ( CarbonCommonConstants . CARBON_TOTAL_DATA_SIZE ) ; loadMetadataDetails . setDataSize ( String . valueOf ( dataSize ) ) ; Long indexSize = dataIndexSize . get ( CarbonCommonConstants . CARBON_TOTAL_INDEX_SIZE ) ; loadMetadataDetails . setIndexSize ( String . valueOf ( indexSize ) ) ; return dataSize + indexSize ; }
This method will add data size and index size into tablestatus for each segment.
This method will add data size and index size into tablestatus for each segment .