DataFileWriter. Use
DataFileReader for file-based input.
DataFileWriter
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| public static class | DataFileStream.Header
A handle that can be used to reopen a DataFile without re-reading the header of the stream. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private DataFileStream. | |
| pack-priv ByteBuffer | |
| pack-priv long | |
| pack-priv long | |
| private long | |
| private Codec | |
| pack-priv BinaryDecoder | datumIn
Secondary decoder, for datums. |
| private DataFileStream. | |
| private DatumReader | |
| pack-priv byte[] | |
| pack-priv BinaryDecoder | vin
Decoder on raw input stream. |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void | |
| public long | |
| public long | |
| public DataFileStream. | |
| public byte[] | |
| public List | |
| public long | |
| public String | |
| public Schema | |
| public boolean | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void | |
| public Iterator | |
| public D | |
| public D | |
| public ByteBuffer | |
| pack-priv DataFileStream. | |
| pack-priv byte[] | |
| public void | |
| pack-priv Codec | |
| pack-priv void |
| availableBlock | back to summary |
|---|---|
| private boolean availableBlock | |
| block | back to summary |
|---|---|
| private DataFileStream. | |
| blockBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer blockBuffer | |
| blockCount | back to summary |
|---|---|
| pack-priv long blockCount | |
| blockRemaining | back to summary |
|---|---|
| pack-priv long blockRemaining | |
| blockSize | back to summary |
|---|---|
| private long blockSize | |
| codec | back to summary |
|---|---|
| private Codec codec | |
| datumIn | back to summary |
|---|---|
| pack-priv BinaryDecoder datumIn Secondary decoder, for datums. (Different than vin for block segments.) | |
| header | back to summary |
|---|---|
| private DataFileStream. | |
| reader | back to summary |
|---|---|
| private DatumReader<D> reader | |
| syncBuffer | back to summary |
|---|---|
| pack-priv byte[] syncBuffer | |
| vin | back to summary |
|---|---|
| pack-priv BinaryDecoder vin Decoder on raw input stream. (Used for metadata.) | |
| DataFileStream | back to summary |
|---|---|
| public DataFileStream(InputStream in, DatumReader<D> reader) throws IOException Construct a reader for an input stream. For file-based input, use
| |
| DataFileStream | back to summary |
|---|---|
| protected DataFileStream(DatumReader<D> reader) throws IOException create an uninitialized DataFileStream | |
| blockFinished | back to summary |
|---|---|
| protected void blockFinished() throws IOException | |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Close this reader.
| |
| getBlockCount | back to summary |
|---|---|
| public long getBlockCount() Expert: Return the count of items in the current block. | |
| getBlockSize | back to summary |
|---|---|
| public long getBlockSize() Expert: Return the size in bytes (uncompressed) of the current block. | |
| getHeader | back to summary |
|---|---|
| public DataFileStream. A handle that can be used to reopen this stream without rereading the head. | |
| getMeta | back to summary |
|---|---|
| public byte[] getMeta(String key) Return the value of a metadata property. | |
| getMetaKeys | back to summary |
|---|---|
| public List Return the list of keys in the metadata | |
| getMetaLong | back to summary |
|---|---|
| public long getMetaLong(String key) Return the value of a metadata property. | |
| getMetaString | back to summary |
|---|---|
| public String getMetaString(String key) Return the value of a metadata property. | |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Return the schema used in this file. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. True if more entries remain in this file.
| |
| hasNextBlock | back to summary |
|---|---|
| pack-priv boolean hasNextBlock() | |
| initialize | back to summary |
|---|---|
| pack-priv void initialize(InputStream in, byte[] magic) throws IOException Initialize the stream by reading from its head. | |
| initialize | back to summary |
|---|---|
| pack-priv void initialize(DataFileStream. Initialize the stream without reading from it. | |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Returns an iterator over entries in this file. Note that this iterator is shared with other users of the file: it does not contain a separate pointer into the file.
| |
| next | back to summary |
|---|---|
| public D next() Implements java. Read the next datum in the file.
| |
| next | back to summary |
|---|---|
| public D next(D reuse) throws IOException Read the next datum from the file.
| |
| nextBlock | back to summary |
|---|---|
| public ByteBuffer nextBlock() throws IOException Expert: Return the next block in the file, as binary-encoded data. | |
| nextRawBlock | back to summary |
|---|---|
| pack-priv DataFileStream. | |
| readMagic | back to summary |
|---|---|
| pack-priv byte[] readMagic() throws IOException | |
| remove | back to summary |
|---|---|
| public void remove() Overrides default java. Not supported.
| |
| resolveCodec | back to summary |
|---|---|
| pack-priv Codec resolveCodec() | |
| validateMagic | back to summary |
|---|---|
| pack-priv void validateMagic(byte[] magic) throws InvalidAvroMagicException | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private byte[] | |
| private boolean | |
| private long | |
| private int |
| Access | Constructor and Description |
|---|---|
| private | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv ByteBuffer | |
| pack-priv int | |
| pack-priv byte[] | |
| pack-priv long | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv void |
| blockSize | back to summary |
|---|---|
| private int blockSize | |
| data | back to summary |
|---|---|
| private byte[] data | |
| flushOnWrite | back to summary |
|---|---|
| private boolean flushOnWrite | |
| numEntries | back to summary |
|---|---|
| private long numEntries | |
| offset | back to summary |
|---|---|
| private int offset | |
| DataBlock | back to summary |
|---|---|
| private DataBlock(long numEntries, int blockSize) | |
| DataBlock | back to summary |
|---|---|
| pack-priv DataBlock(ByteBuffer block, long numEntries) | |
| compressUsing | back to summary |
|---|---|
| pack-priv void compressUsing(Codec c) throws IOException | |
| decompressUsing | back to summary |
|---|---|
| pack-priv void decompressUsing(Codec c) throws IOException | |
| getAsByteBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer getAsByteBuffer() | |
| getBlockSize | back to summary |
|---|---|
| pack-priv int getBlockSize() | |
| getData | back to summary |
|---|---|
| pack-priv byte[] getData() | |
| getNumEntries | back to summary |
|---|---|
| pack-priv long getNumEntries() | |
| isFlushOnWrite | back to summary |
|---|---|
| pack-priv boolean isFlushOnWrite() | |
| setFlushOnWrite | back to summary |
|---|---|
| pack-priv void setFlushOnWrite(boolean flushOnWrite) | |
| writeBlockTo | back to summary |
|---|---|
| pack-priv void writeBlockTo(BinaryEncoder e, byte[] sync) throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Map | |
| private transient List | |
| pack-priv Schema | |
| pack-priv byte[] |
| Access | Constructor and Description |
|---|---|
| private |
| meta | back to summary |
|---|---|
| pack-priv Map<String, byte[]> meta | |
| metaKeyList | back to summary |
|---|---|
| private transient List<String> metaKeyList | |
| schema | back to summary |
|---|---|
| pack-priv Schema schema | |
| sync | back to summary |
|---|---|
| pack-priv byte[] sync | |
| Header | back to summary |
|---|---|
| private Header() | |