Java Code Examples for org.apache.avro.generic.GenericFixed#bytes()
The following examples show how to use
org.apache.avro.generic.GenericFixed#bytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PigAvroDatumReader.java From Cubert with Apache License 2.0 | 5 votes |
/** * Called to read a fixed value. Overridden to read a pig byte array. */ @Override protected Object readFixed(Object old, Schema expected, Decoder in) throws IOException { GenericFixed fixed = (GenericFixed) super.readFixed(old, expected, in); DataByteArray byteArray = new DataByteArray(fixed.bytes()); return byteArray; }
Example 2
Source File: PigAvroDatumReader.java From spork with Apache License 2.0 | 5 votes |
/** * Called to read a fixed value. Overridden to read a pig byte array. */ @Override protected Object readFixed(Object old, Schema expected, Decoder in) throws IOException { GenericFixed fixed = (GenericFixed) super.readFixed(old, expected, in); DataByteArray byteArray = new DataByteArray(fixed.bytes()); return byteArray; }