core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
/**
   * The method returns the B-Tree for a particular taskId
   *
   * @param taskId
   * @param tableBlockInfoList
   * @param absoluteTableIdentifier
   */
The method returns the B-Tree for a particular taskId
@param taskId
@param tableBlockInfoList
@param absoluteTableIdentifier
The method returns the B - Tree for a particular taskId @param taskId @param tableBlockInfoList @param absoluteTableIdentifier
public static long calculateDriverBTreeSize(String taskId, String bucketNumber,
      List<TableBlockInfo> tableBlockInfoList, AbsoluteTableIdentifier absoluteTableIdentifier) {
    Collections.sort(tableBlockInfoList);
    CarbonTablePath carbonTablePath = CarbonStorePath
        .getCarbonTablePath(absoluteTableIdentifier.getTablePath(),
            absoluteTableIdentifier.getCarbonTableIdentifier());
    String carbonIndexFilePath = carbonTablePath
        .getCarbonIndexFilePath(taskId, "0", tableBlockInfoList.get(0).getSegmentId(),
            bucketNumber, CarbonTablePath.DataFileUtil
                .getTimeStampFromFileName(tableBlockInfoList.get(0).getFilePath()),
            tableBlockInfoList.get(0).getVersion());
    CarbonFile carbonFile = FileFactory
        .getCarbonFile(carbonIndexFilePath, FileFactory.getFileType(carbonIndexFilePath));
    return carbonFile.getSize();
  }
public static long calculateDriverBTreeSize ( String taskId , String bucketNumber , List < TableBlockInfo > tableBlockInfoList , AbsoluteTableIdentifier absoluteTableIdentifier ) { Collections . sort ( tableBlockInfoList ) ; CarbonTablePath carbonTablePath = CarbonStorePath . getCarbonTablePath ( absoluteTableIdentifier . getTablePath ( ) , absoluteTableIdentifier . getCarbonTableIdentifier ( ) ) ; String carbonIndexFilePath = carbonTablePath . getCarbonIndexFilePath ( taskId , "0" , tableBlockInfoList . get ( 0 ) . getSegmentId ( ) , bucketNumber , CarbonTablePath . DataFileUtil . getTimeStampFromFileName ( tableBlockInfoList . get ( 0 ) . getFilePath ( ) ) , tableBlockInfoList . get ( 0 ) . getVersion ( ) ) ; CarbonFile carbonFile = FileFactory . getCarbonFile ( carbonIndexFilePath , FileFactory . getFileType ( carbonIndexFilePath ) ) ; return carbonFile . getSize ( ) ; }
The method returns the B-Tree for a particular taskId
 @param taskId
 @param tableBlockInfoList
 @param absoluteTableIdentifier
The method returns the B - Tree for a particular taskId @param taskId @param tableBlockInfoList @param absoluteTableIdentifier
// need to sort the  block info list based for task in ascending  order so // it will be sinkup with block index read from file // geting the index file path //TODO need to pass proper partition number when partiton will be supported // in case of carbonIndex file whole file is meta only so reading complete file.