Package org.apache.hadoop.hbase.io
Interface CellOutputStream
- All Known Subinterfaces:
Codec.Encoder
- All Known Implementing Classes:
BaseEncoder
,CellCodec.CellEncoder
,CellCodecWithTags.CellEncoder
,KeyValueCodec.KeyValueEncoder
,KeyValueCodecWithTags.KeyValueEncoder
,MessageCodec.MessageEncoder
,SecureWALCellCodec.EncryptedKvEncoder
,WALCellCodec.CompressedKvEncoder
,WALCellCodec.EnsureKvEncoder
Accepts a stream of Cells. This can be used to build a block of cells during compactions and
flushes, or to build a byte[] to send to the client. This could be backed by a
List<KeyValue>, but more efficient implementations will append results to a byte[] to
eliminate overhead, and possibly encode the cells further.
To read Cells, use CellScanner
- See Also:
-
Method Summary
-
Method Details
-
write
Implementation must copy the entire state of the Cell. If the written Cell is modified immediately after the write method returns, the modifications must have absolutely no effect on the copy of the Cell that was added in the write.- Parameters:
cell
- Cell to write out- Throws:
IOException
-
flush
Let the implementation decide what to do. Usually means writing accumulated data into a byte[] that can then be read from the implementation to be sent to disk, put in the block cache, or sent over the network.- Throws:
IOException
-