Exemplo n.º 1
0
 public void readFields(DataInput in) throws IOException {
   // instance-specific
   this.sampleStrs = new ArrayList<String>();
   int numSamples = in.readInt();
   for (int i = 0; i < numSamples; i++) {
     sampleStrs.add(UTF8.readString(in).toString());
   }
   this.tokenClassIdentifier = in.readInt();
   if (in.readBoolean()) {
     this.tokenParameter = UTF8.readString(in);
   } else {
     this.tokenParameter = null;
   }
   this.schema = computeAvroSchema();
 }
Exemplo n.º 2
0
 public void readFields(DataInput in) throws IOException {
   int numUnionElts = in.readInt();
   this.unionTypes = new ArrayList<InferredType>();
   for (int i = 0; i < numUnionElts; i++) {
     unionTypes.add(InferredType.readType(in));
   }
   this.schema = computeAvroSchema();
 }