Package org.apache.hadoop.hdfs.protocol

Examples of org.apache.hadoop.hdfs.protocol.PacketBlockReceiverProfileData


      cluster.shutdown();
    }
  }
 
  public void testPacketBlockReceiverProfileData() throws IOException {
    PacketBlockReceiverProfileData profile = new PacketBlockReceiverProfileData();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    profile.write(dos);
    dos.close();
    DataInputStream dis = new DataInputStream(new ByteArrayInputStream(
        baos.toByteArray()));
    profile.readFields(dis);
    dis.close();
  }
View Full Code Here


          "    timeInAckQueue: " + timeInAckQueue + "\n" +
          "    timeReceiveAck: " + timeReceiveAck + "\n\n");
      if (profilesFromDataNodes != null && profilesFromDataNodes.length > 0) {
        sb.append("  " + profilesFromDataNodes.length + " data nodes involved:\n");
        for (int i = 0; i < profilesFromDataNodes.length; i++) {
          PacketBlockReceiverProfileData profile = profilesFromDataNodes[i];
          if (profile != null) {
            sb.append("  DataNode #" + (i+1) + ":\n");
            sb.append(profile.toString());
            sb.append("\n");
          }
        }
      }
      return sb.toString();
View Full Code Here

 
  /**
   * @return a writable object ready to send to clients.
   */
  PacketBlockReceiverProfileData getPacketBlockReceiverProfileData() {
    PacketBlockReceiverProfileData ret = new PacketBlockReceiverProfileData();
    ret.durationRead = this.durationRead;
    ret.durationForward = this.durationForward;
    ret.durationEnqueue = this.durationEnqueue;
    ret.durationSetPosition = this.durationSetPosition;
    ret.durationVerifyChecksum = this.durationVerifyChecksum;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hdfs.protocol.PacketBlockReceiverProfileData

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.