throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do {
throw new InvalidAvroMagicException("Not an Avro data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do {
int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize); long l = vin.readMapStart(); if (l > 0) { do {
int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize); long l = vin.readMapStart(); if (l > 0) { do {
@Override public long decodeMapStart() throws IOException { return _decoder.readMapStart(); }
@Override public long readMapStart() throws IOException { return wrappedDecoder.readMapStart(); }
@Override public long readMapStart() throws IOException { return wrappedDecoder.readMapStart(); }
@Override public long readMapStart() throws IOException { return wrappedDecoder.readMapStart(); }
long numRecords = decoder.readMapStart(); while (numRecords > 0) { for (long recordIndex = 0; recordIndex < numRecords; recordIndex++) {
throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do {
throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do {
void initialize(InputStream in) throws IOException { this.vin = DecoderFactory.defaultFactory().createBinaryDecoder(in, vin); byte[] magic = new byte[DataFileConstants.MAGIC.length]; try { vin.readFixed(magic); // read magic } catch (IOException e) { throw new IOException("Not a data file."); } if (!Arrays.equals(DataFileConstants.MAGIC, magic)) throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do { for (long i = 0; i < l; i++) { String key = vin.readString(null).toString(); ByteBuffer value = vin.readBytes(null); byte[] bb = new byte[value.remaining()]; value.get(bb); meta.put(key, bb); } } while ((l = vin.mapNext()) != 0); } vin.readFixed(sync); // read sync this.codec = resolveCodec(); this.schema = Schema.parse(getMetaString(DataFileConstants.SCHEMA)); reader.setSchema(schema); }
long numRecords = decoder.readMapStart(); while (numRecords > 0 && schema == null) { for (long recordIndex = 0; recordIndex < numRecords; recordIndex++) {
void initialize(InputStream in) throws IOException { this.vin = DecoderFactory.defaultFactory().createBinaryDecoder(in, vin); byte[] magic = new byte[DataFileConstants.MAGIC.length]; try { vin.readFixed(magic); // read magic } catch (IOException e) { throw new IOException("Not a data file."); } if (!Arrays.equals(DataFileConstants.MAGIC, magic)) throw new IOException("Not a data file."); long l = vin.readMapStart(); // read meta data if (l > 0) { do { for (long i = 0; i < l; i++) { String key = vin.readString(null).toString(); ByteBuffer value = vin.readBytes(null); byte[] bb = new byte[value.remaining()]; value.get(bb); meta.put(key, bb); } } while ((l = vin.mapNext()) != 0); } vin.readFixed(sync); // read sync this.codec = resolveCodec(); this.schema = Schema.parse(getMetaString(DataFileConstants.SCHEMA)); reader.setSchema(schema); }
int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize); long l = vin.readMapStart(); if (l > 0) { do {
int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize); long l = vin.readMapStart(); if (l > 0) { do {
final SpecificDatumReader<StackSampleElement> reader = new SpecificDatumReader<>(StackSampleElement.SCHEMA$); final BinaryDecoder decoder = DecoderFactory.get().directBinaryDecoder(bis, null); long nrItems = decoder.readMapStart(); StackSampleElement asmp = new StackSampleElement(); Map<String, SampleNode> result = new HashMap<>((int) nrItems);
case STATE_START: _parser.setAvroContext(this); _count = _decoder.readMapStart(); _state = (_count > 0) ? STATE_NAME : STATE_END; return (_currToken = JsonToken.START_OBJECT);