Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15629

Add seqno when warning slow mirror/disk in BlockReceiver

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • datanode
    • None
    • Reviewed

    Description

      When client write slow, it will print a slow log from DataStreamer

      if (ack.getSeqno() != DFSPacket.HEART_BEAT_SEQNO) {
        Long begin = packetSendTime.get(ack.getSeqno());
        if (begin != null) {
          long duration = Time.monotonicNow() - begin;
          if (duration > dfsclientSlowLogThresholdMs) {
            LOG.info("Slow ReadProcessor read fields for block " + block
                + " took " + duration + "ms (threshold="
                + dfsclientSlowLogThresholdMs + "ms); ack: " + ack
                + ", targets: " + Arrays.asList(targets));
          }
        }
      }
      

      here is an example:

      Slow ReadProcessor read fields for block BP-XXX:blk_XXX took 2756ms (threshold=100ms); ack: seqno: 3341 status: SUCCESS status: SUCCESS status: SUCCESS downstreamAckTimeNanos: 2751531959 4: "\000\000\000", targets: [XXX, XXX, XXX]

      There is an ack seqno in the log, so we can find which packet cause write slow. However, datanode didn't print the seqno in slow log, so we can't kown this packet write slow in which stage.

      HDFS-11603 and HDFS-12814 add some slow warnings in BlockReceiver, i think we should add seqno in these slow warnings, in order to find the corresponding packet write slow in which stage.

      Attachments

        1. HDFS-15629-001.patch
          5 kB
          Haibin Huang

        Activity

          People

            huanghaibin Haibin Huang
            huanghaibin Haibin Huang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: