/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
for (int i = 0; i < blockCnt; ++i) { BlockRegion region = reader.readerBCF.dataIndex.getBlockRegionList().get(i); dataSize += region.getCompressedSize(); dataSizeUncompressed += region.getRawSize(); reader.readerBCF.dataIndex.getBlockRegionList().get(i); TFileIndexEntry indexEntry = reader.tfileIndex.getEntry(i); out.printf("%s %s %s %s %s ", Align.format(Align.format(i,
for (int i = 0; i < blockCnt; ++i) { BlockRegion region = reader.readerBCF.dataIndex.getBlockRegionList().get(i); dataSize += region.getCompressedSize(); dataSizeUncompressed += region.getRawSize(); reader.readerBCF.dataIndex.getBlockRegionList().get(i); TFileIndexEntry indexEntry = reader.tfileIndex.getEntry(i); out.printf("%s %s %s %s %s ", Align.format(Align.format(i,
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
/** * Stream access to a Data Block. * * @param blockIndex * 0-based data block index. * @return BlockReader input stream for reading the data block. * @throws IOException */ public BlockReader getDataBlock(int blockIndex) throws IOException { if (blockIndex < 0 || blockIndex >= getBlockCount()) { throw new IndexOutOfBoundsException(String.format( "blockIndex=%d, numBlocks=%d", blockIndex, getBlockCount())); } BlockRegion region = dataIndex.getBlockRegionList().get(blockIndex); return createReader(dataIndex.getDefaultCompressionAlgorithm(), region); }
/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Get the number of data blocks. * * @return the number of data blocks. */ public int getBlockCount() { return dataIndex.getBlockRegionList().size(); }
/** * Find the smallest Block index whose starting offset is greater than or * equal to the specified offset. * * @param offset * User-specific offset. * @return the index to the data Block if such block exists; or -1 * otherwise. */ public int getBlockIndexNear(long offset) { ArrayList<BlockRegion> list = dataIndex.getBlockRegionList(); int idx = Utils .lowerBound(list, new ScalarLong(offset), new ScalarComparator()); if (idx == list.size()) { return -1; } return idx; } }