Package org.apache.avro.specific

Examples of org.apache.avro.specific.SpecificDatumReader


    if (!EventWriter.VERSION.equals(version)) {
      throw new IOException("Incompatible event log version: "+version);
    }
   
    this.schema = Schema.parse(in.readLine());
    this.reader = new SpecificDatumReader(schema);
    this.decoder = DecoderFactory.get().jsonDecoder(schema, in);
  }
View Full Code Here


         
          currentArray.add(fromBytes(currentSchema, entry.getValue().get()));

          break;
        case RECORD:
          SpecificDatumReader reader = new SpecificDatumReader(field.schema());
          byte[] val = entry.getValue().get();
          // TODO reuse decoder
          BinaryDecoder decoder = DecoderFactory.defaultFactory().createBinaryDecoder(val, null);
          persistent.put(field.pos(), reader.read(null, decoder));
          break;
        default:
          persistent.put(field.pos(), fromBytes(field.schema(), entry.getValue().get()));
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.avro.specific.SpecificDatumReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.