core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
/**
   * The method calculate the B-Tree metadata size.
   *
   * @param tableBlockInfo
   * @return
   */
The method calculate the B-Tree metadata size.
The method calculate the B - Tree metadata size .
public static long calculateMetaSize(TableBlockInfo tableBlockInfo) throws IOException {
    FileHolder fileReader = null;
    try {
      long completeBlockLength = tableBlockInfo.getBlockLength();
      long footerPointer = completeBlockLength - 8;
      String filePath = tableBlockInfo.getFilePath();
      fileReader = FileFactory.getFileHolder(FileFactory.getFileType(filePath));
      long actualFooterOffset = fileReader.readLong(filePath, footerPointer);
      return footerPointer - actualFooterOffset;
    } finally {
      if (null != fileReader) {
        try {
          fileReader.finish();
        } catch (IOException e) {
          fileReader = null;
        }
      }
    }
  }
public static long calculateMetaSize ( TableBlockInfo tableBlockInfo ) throws IOException { FileHolder fileReader = null ; try { long completeBlockLength = tableBlockInfo . getBlockLength ( ) ; long footerPointer = completeBlockLength - 8 ; String filePath = tableBlockInfo . getFilePath ( ) ; fileReader = FileFactory . getFileHolder ( FileFactory . getFileType ( filePath ) ) ; long actualFooterOffset = fileReader . readLong ( filePath , footerPointer ) ; return footerPointer - actualFooterOffset ; } finally { if ( null != fileReader ) { try { fileReader . finish ( ) ; } catch ( IOException e ) { fileReader = null ; } } } }
The method calculate the B-Tree metadata size.
The method calculate the B - Tree metadata size .
// ignore the exception as nothing we can do about it