@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. * * @param name * Name of the meta block. * @param compressName * Name of the compression algorithm to be used. Must be one of the * strings returned by * {@link TFile#getSupportedCompressionAlgorithms()}. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name, String compressName) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); DataOutputStream outputStream = writerBCF.prepareMetaBlock(name, compressName); return outputStream; }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
/** * Obtain an output stream for creating a meta block. This function may not * be called when there is a key append stream or value append stream * active. No more key-value insertion is allowed after a meta data block * has been added to TFile. Data will be compressed using the default * compressor as defined in Writer's constructor. * * @param name * Name of the meta block. * @return A DataOutputStream that can be used to write Meta Block data. * Closing the stream would signal the ending of the block. * @throws IOException * @throws MetaBlockAlreadyExists * the Meta Block with the same name already exists. */ public DataOutputStream prepareMetaBlock(String name) throws IOException, MetaBlockAlreadyExists { if (state != State.READY) { throw new IllegalStateException( "Incorrect state to start a Meta Block: " + state.name()); } finishDataBlock(true); return writerBCF.prepareMetaBlock(name); }
@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }
@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }
@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }
@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }
@Override public void close() throws IOException { if (closed == true) { return; } try { ++errorCount; super.close(); blkRecordCount++; // bump up the total record count in the whole file tfileMeta.incRecordCount(); finishDataBlock(false); --errorCount; } finally { closed = true; state = State.READY; } } }