Пример #1
0
 @SuppressWarnings("deprecation")
 public void readFields(DataInput in) throws IOException {
   rpcVersion = in.readLong();
   declaringClassProtocolName = UTF8.readString(in);
   methodName = UTF8.readString(in);
   clientVersion = in.readLong();
   clientMethodsHash = in.readInt();
   parameters = new Object[in.readInt()];
   parameterClasses = new Class[parameters.length];
   ObjectWritable objectWritable = new ObjectWritable();
   for (int i = 0; i < parameters.length; i++) {
     parameters[i] = ObjectWritable.readObject(in, objectWritable, this.conf);
     parameterClasses[i] = objectWritable.getDeclaredClass();
   }
 }
Пример #2
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();
 }
Пример #3
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();
 }
Пример #4
0
 public void readFields(DataInput in) throws IOException {
   methodName = UTF8.readString(in);
   parameters = new Object[in.readInt()];
   parameterClasses = new Class[parameters.length];
   ObjectWritable objectWritable = new ObjectWritable();
   for (int i = 0; i < parameters.length; i++) {
     parameters[i] = ObjectWritable.readObject(in, objectWritable, this.conf);
     parameterClasses[i] = objectWritable.getDeclaredClass();
   }
 }
Пример #5
0
 /**
  * {@inheritDoc}
  *
  * @see Writable#readFields(DataInput)
  */
 public void readFields(DataInput in) throws IOException {
   BSONDecoder dec = new BSONDecoder();
   BSONCallback cb = new BasicBSONCallback();
   // Read the BSON length from the start of the record
   int dataLen = in.readInt();
   byte[] buf = new byte[dataLen];
   in.readFully(buf);
   dec.decode(buf, cb);
   _doc = (BSONObject) cb.get();
   log.info("Decoded a BSON Object: " + _doc);
 }
 public void readFields(DataInput in) throws IOException {
   blockToken.readFields(in);
   this.corrupt = in.readBoolean();
   offset = in.readLong();
   this.b = new Block();
   b.readFields(in);
   int count = in.readInt();
   this.locs = new DatanodeInfo[count];
   for (int i = 0; i < locs.length; i++) {
     locs[i] = new DatanodeInfo();
     locs[i].readFields(in);
   }
 }
Пример #7
0
 /** Implement readFields of Writable */
 public void readFields(DataInput in) throws IOException {
   this.offset = in.readLong();
   this.length = in.readLong();
   int numNames = in.readInt();
   this.names = new String[numNames];
   for (int i = 0; i < numNames; i++) {
     Text name = new Text();
     name.readFields(in);
     names[i] = name.toString();
   }
   int numHosts = in.readInt();
   for (int i = 0; i < numHosts; i++) {
     Text host = new Text();
     host.readFields(in);
     hosts[i] = host.toString();
   }
   int numTops = in.readInt();
   Text path = new Text();
   for (int i = 0; i < numTops; i++) {
     path.readFields(in);
     topologyPaths[i] = path.toString();
   }
 }
 public void readFields(DataInput in) throws IOException {
   this.action = in.readInt();
 }