Java 类org.apache.hadoop.hdfs.protocol.DataTransferProtocol.PipelineAck 实例源码

项目:hadoop-EAR    文件:DFSWriteProfilingData.java   
public void finishPacket(WritePacketClientProfile pktProfile,
    PipelineAck pipelineAck) {
  if (pktProfile == null) {
    return;
  }

  if (pipelineAck != null) {
    pktProfile.profilesFromDataNodes = pipelineAck.getProfiles();
  }

  pktProfile.timeInAckQueue = timeStartReceiveAck - pktProfile.startTime;
  pktProfile.timeReceiveAck = System.nanoTime() - timeStartReceiveAck;

  recentPacketProfile = pktProfile;
  timePreparePkt += pktProfile.timeBeforeAddToDataQueue;
  timeSendPkt += pktProfile.timeSendPacket;
  timeReceiveAck += pktProfile.timeReceiveAck;

  numPkts++;
  totalTimeInDataQueue += pktProfile.timeInDataQueue;
  totalTimeInAckQueue += pktProfile.timeInAckQueue;

  if (currentBlockProfile != null) {
    currentBlockProfile.updateDnProfiles(pipelineAck.getProfiles());
  }
}