Exemplo n.º 1
0
 public void readFields(DataInput in) throws IOException {
   this.blockId = in.readLong();
   this.numBytes = in.readLong();
   this.generationStamp = in.readLong();
   if (numBytes < 0) {
     throw new IOException("Unexpected block size: " + numBytes);
   }
 }
Exemplo n.º 2
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();
   }
 }
 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);
   }
 }
Exemplo n.º 4
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();
   }
 }
Exemplo n.º 5
0
 public void readFields(DataInput in) throws IOException {
   this.genstamp = in.readLong();
   if (this.genstamp < 0) {
     throw new IOException("Bad Generation Stamp: " + this.genstamp);
   }
 }