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

NameNode may fail to start when dfs.client.test.drop.namenode.response.number is set

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 2.1.1-beta
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In HDFS-5118 we add a new configuration property "dfs.client.test.drop.namenode.response.number" for DFSClient, which controls if DFSClient drops RPC responses for testing purpose.

      Currently this property can only be set in the configuration of the client side (with HA configuration). If Namenode's configuration sets this property with a positive value, an IllegalStateException may be thrown (e.g., when starting the trash emptier thread in NN). This is because NN will overwrite the configuration properties such as fs.defaultFS, when the trash emptier thread is started and tries to create a DistributedFileSystem instance, it will find that 1) the drop response property is set with a positive number, and 2) the given namenode URI is not a logical name (overwritten by NN before).

      A simple fix is to check if we can get a LossyRetryInvocationHandler based proxy in the constructor of DFSClient. If not, instead of throwing an exception, we can fall back to the original DFSClient creation process.

        Attachments

        1. HDFS-5192.002.patch
          7 kB
          Jing Zhao
        2. HDFS-5192.001.patch
          6 kB
          Jing Zhao

          Activity

            People

            • Assignee:
              jingzhao Jing Zhao
              Reporter:
              jingzhao Jing Zhao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: