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

Setting dfs.datanode.max.transfer.threads to a very small value can cause strange failure.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.3.1, 3.4.0
    • datanode
    • None

    Description

      Configuration parameter dfs.datanode.max.transfer.threads is to specify the maximum number of threads to use for transferring data in and out of the DN. This is a vital param that need to tune carefully. 

      // DataXceiverServer.java
      // Make sure the xceiver count is not exceeded
      intcurXceiverCount = datanode.getXceiverCount();
      if (curXceiverCount > maxXceiverCount) {
      thrownewIOException("Xceiver count " + curXceiverCount
      + " exceeds the limit of concurrent xceivers: "
      + maxXceiverCount);
      }
      

      There are many issues that caused by not setting this param to an appropriate value. However, there is no any check code to restrict the parameter. Although having a hard-and-fast rule is difficult because we need to consider number of cores, main memory etc, we can prevent users from setting this value to an absolute wrong value by accident. (e.g. a negative value that totally break the availability of datanode.)

      How to fix:

      Add proper check code for the parameter.

      Attachments

        1. HDFS-15443.000.patch
          1.0 kB
          AMC-team
        2. HDFS-15443.001.patch
          1.0 kB
          AMC-team
        3. HDFS-15443.002.patch
          1.0 kB
          AMC-team
        4. HDFS-15443.003.patch
          1.0 kB
          AMC-team

        Activity

          People

            AMC-team AMC-team
            AMC-team AMC-team
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: