new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
new TFileIndexEntry(new DataInputStream(new ByteArrayInputStream( buffer, 0, size))); index.add(idx);
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }
/** * Close the current data block if necessary. * * @param bForceFinish * Force the closure regardless of the block size. * @throws IOException */ void finishDataBlock(boolean bForceFinish) throws IOException { if (blkAppender == null) { return; } // exceeded the size limit, do the compression and finish the block if (bForceFinish || blkAppender.getCompressedSize() >= sizeMinBlock) { // keep tracks of the last key of each data block, no padding // for now TFileIndexEntry keyLast = new TFileIndexEntry(lastKeyBufferOS.getBuffer(), 0, lastKeyBufferOS .size(), blkRecordCount); tfileIndex.addEntry(keyLast); // close the appender blkAppender.close(); blkAppender = null; blkRecordCount = 0; } } }