コード例 #1
0
 @SuppressWarnings("deprecation")
 public void write(DataOutput out) throws IOException {
   out.writeLong(rpcVersion);
   UTF8.writeString(out, declaringClassProtocolName);
   UTF8.writeString(out, methodName);
   out.writeLong(clientVersion);
   out.writeInt(clientMethodsHash);
   out.writeInt(parameterClasses.length);
   for (int i = 0; i < parameterClasses.length; i++) {
     ObjectWritable.writeObject(out, parameters[i], parameterClasses[i], conf, true);
   }
 }
コード例 #2
0
 public void write(DataOutput out) throws IOException {
   out.write(BASE_TYPE);
   out.writeUTF(name);
   out.writeInt(sampleStrs.size());
   for (int i = 0; i < sampleStrs.size(); i++) {
     UTF8.writeString(out, sampleStrs.get(i));
   }
   out.writeInt(tokenClassIdentifier);
   out.writeBoolean(tokenParameter != null);
   if (tokenParameter != null) {
     UTF8.writeString(out, tokenParameter);
   }
 }
コード例 #3
0
ファイル: RPC.java プロジェクト: baeeq/hadoop-20
 public void write(DataOutput out) throws IOException {
   ObjectWritable.writeStringCached(out, methodName);
   out.writeInt(parameterClasses.length);
   for (int i = 0; i < parameterClasses.length; i++) {
     ObjectWritable.writeObject(out, parameters[i], parameterClasses[i], conf);
   }
 }
コード例 #4
0
 public void write(DataOutput out) throws IOException {
   out.write(UNION_TYPE);
   out.writeUTF(name);
   out.writeInt(unionTypes.size());
   for (InferredType it : unionTypes) {
     it.write(out);
   }
 }
コード例 #5
0
 public void write(DataOutput out) throws IOException {
   out.write(STRUCT_TYPE);
   out.writeUTF(name);
   out.writeInt(structTypes.size());
   for (InferredType it : structTypes) {
     it.write(out);
   }
 }
コード例 #6
0
 /** Implement write of Writable */
 public void write(DataOutput out) throws IOException {
   out.writeLong(offset);
   out.writeLong(length);
   out.writeInt(names.length);
   for (int i = 0; i < names.length; i++) {
     Text name = new Text(names[i]);
     name.write(out);
   }
   out.writeInt(hosts.length);
   for (int i = 0; i < hosts.length; i++) {
     Text host = new Text(hosts[i]);
     host.write(out);
   }
   out.writeInt(topologyPaths.length);
   for (int i = 0; i < topologyPaths.length; i++) {
     Text host = new Text(topologyPaths[i]);
     host.write(out);
   }
 }
コード例 #7
0
 ///////////////////////////////////////////
 // Writable
 ///////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   blockToken.write(out);
   out.writeBoolean(corrupt);
   out.writeLong(offset);
   b.write(out);
   out.writeInt(locs.length);
   for (int i = 0; i < locs.length; i++) {
     locs[i].write(out);
   }
 }
コード例 #8
0
 /**
  * {@inheritDoc}
  *
  * @see Writable#write(DataOutput)
  */
 public void write(DataOutput out) throws IOException {
   BSONEncoder enc = new BSONEncoder();
   BasicOutputBuffer buf = new BasicOutputBuffer();
   enc.set(buf);
   enc.putObject(_doc);
   enc.done();
   out.writeInt(buf.size());
   // For better performance we can copy BasicOutputBuffer.pipe(OutputStream)
   // to have a method signature that works with DataOutput
   out.write(buf.toByteArray());
 }
コード例 #9
0
 // /////////////////////////////////////////
 // Writable
 // /////////////////////////////////////////
 public void write(DataOutput out) throws IOException {
   out.writeInt(this.action);
 }