Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4320

Add a separate configuration for namenode rpc address instead of only using fs.default.name

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0, 3.0.0, 2.1.1-beta
    • Fix Version/s: 1.2.0
    • Component/s: datanode, namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Hide
      The namenode RPC address is currently identified from configuration "fs.default.name". In some setups where default FS is other than HDFS, the "fs.default.name" cannot be used to get the namenode address. When such a setup co-exists with HDFS, with this change namenode can be identified using a separate configuration parameter "dfs.namenode.rpc-address".

      "dfs.namenode.rpc-address", when configured, overrides fs.default.name for identifying namenode RPC address.
      Show
      The namenode RPC address is currently identified from configuration "fs.default.name". In some setups where default FS is other than HDFS, the "fs.default.name" cannot be used to get the namenode address. When such a setup co-exists with HDFS, with this change namenode can be identified using a separate configuration parameter "dfs.namenode.rpc-address". "dfs.namenode.rpc-address", when configured, overrides fs.default.name for identifying namenode RPC address.

      Description

      When NameNode starts up, it tries to find out its address by looking at the fs.default.name configuration key instead of using its own keys. This breaks scenarios where we try to configure a Hadoop cluster that uses a different default file system than DFS, but still try to prop up namenode and datanode services as a secondary file system.

      1. HDFS-4320-trunk.4.patch
        1 kB
        Chuan Liu
      2. HDFS-4320-trunk.3.patch
        0.7 kB
        Chuan Liu
      3. HDFS-4320.branch-1.3.patch
        3 kB
        Mostafa Elhemali
      4. HDFS-4320.branch-1.2.patch
        2 kB
        Mostafa Elhemali
      5. HDFS-4320.trunk.2.patch
        2 kB
        Mostafa Elhemali
      6. HDFS-4320.trunk.patch
        1 kB
        Mostafa Elhemali
      7. HDFS-4320.patch
        0.9 kB
        Mostafa Elhemali

        Activity

        Hide
        Mostafa Elhemali added a comment -

        Possible fix attached.

        Show
        Mostafa Elhemali added a comment - Possible fix attached.
        Hide
        Mostafa Elhemali added a comment -

        Patch for branch-1 attached.

        Show
        Mostafa Elhemali added a comment - Patch for branch-1 attached.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561364/HDFS-4320.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3676//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12561364/HDFS-4320.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3676//console This message is automatically generated.
        Hide
        Mostafa Elhemali added a comment -

        Patch for trunk.

        Show
        Mostafa Elhemali added a comment - Patch for trunk.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561365/HDFS-4320.trunk.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.balancer.TestBalancerWithMultipleNameNodes
        org.apache.hadoop.hdfs.TestRestartDFS
        org.apache.hadoop.hdfs.TestDistributedFileSystem
        org.apache.hadoop.hdfs.TestHDFSServerPorts

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3677//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3677//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12561365/HDFS-4320.trunk.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.balancer.TestBalancerWithMultipleNameNodes org.apache.hadoop.hdfs.TestRestartDFS org.apache.hadoop.hdfs.TestDistributedFileSystem org.apache.hadoop.hdfs.TestHDFSServerPorts +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3677//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3677//console This message is automatically generated.
        Hide
        Mostafa Elhemali added a comment -

        OK I just realized the error of my ways: the original patch I uploaded was incorrect, since it was trying to overload the dfs.namenode.servicerpc-address configuration which is just meant for providing a second endpoint for services as opposed to clients of NameNode.

        I have a second proposed fix for this problem: a new configuration key dfs.namenode.address that specifies the namenode's address if present. If it's absent, we fallback on today's fs.default.name logic. Would that work?

        Show
        Mostafa Elhemali added a comment - OK I just realized the error of my ways: the original patch I uploaded was incorrect, since it was trying to overload the dfs.namenode.servicerpc-address configuration which is just meant for providing a second endpoint for services as opposed to clients of NameNode. I have a second proposed fix for this problem: a new configuration key dfs.namenode.address that specifies the namenode's address if present. If it's absent, we fallback on today's fs.default.name logic. Would that work?
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561383/HDFS-4320.trunk.2.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3678//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3678//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12561383/HDFS-4320.trunk.2.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . The javadoc tool did not generate any warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in hadoop-hdfs-project/hadoop-hdfs. +1 contrib tests . The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/3678//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3678//console This message is automatically generated.
        Hide
        Mostafa Elhemali added a comment -

        I had a conversation with Suresh and he pointed out that I misunderstood trunk code and my patch for trunk doesn't make sense - we already have dfs.namenode.rpc-address that can override fs.default.name in trunk, so it isn't a problem there.

        Attached a new patch just for branch-1 that in-spirit ports this configuration key dfs.namenode.rpc-address, which if present will override fs.default.name for namenode/datanode to find out what the namenode address is in the cluster.

        Show
        Mostafa Elhemali added a comment - I had a conversation with Suresh and he pointed out that I misunderstood trunk code and my patch for trunk doesn't make sense - we already have dfs.namenode.rpc-address that can override fs.default.name in trunk, so it isn't a problem there. Attached a new patch just for branch-1 that in-spirit ports this configuration key dfs.namenode.rpc-address, which if present will override fs.default.name for namenode/datanode to find out what the namenode address is in the cluster.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12561949/HDFS-4320.branch-1.2.patch
        against trunk revision .

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3685//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12561949/HDFS-4320.branch-1.2.patch against trunk revision . -1 patch . The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/3685//console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        Canceling the patch, since the patch is only relevant to branch-1.

        Show
        Suresh Srinivas added a comment - Canceling the patch, since the patch is only relevant to branch-1.
        Hide
        Suresh Srinivas added a comment -

        Mostafa, could you please add a couple of tests for this change. Also please add this new configuration to hdfs-default.xml site, similar to the description in hdfs-default.xml in trunk minus the name service id and multiple namenodes.

        Show
        Suresh Srinivas added a comment - Mostafa, could you please add a couple of tests for this change. Also please add this new configuration to hdfs-default.xml site, similar to the description in hdfs-default.xml in trunk minus the name service id and multiple namenodes.
        Hide
        Mostafa Elhemali added a comment -

        Thanks Suresh - updated the patch with unit test and documentation in hdfs-default. This is the documentation I have - does it sound good?

        <property>
          <name>dfs.namenode.rpc-address</name>
          <value></value>
          <description>
            RPC address that handles all clients requests. If empty then we'll get the
            value from fs.default.name.
            The value of this property will take the form of hdfs://nn-host1:rpc-port.
          </description>
        </property>
        
        Show
        Mostafa Elhemali added a comment - Thanks Suresh - updated the patch with unit test and documentation in hdfs-default. This is the documentation I have - does it sound good? <property> <name>dfs.namenode.rpc-address</name> <value></value> <description> RPC address that handles all clients requests. If empty then we'll get the value from fs. default .name. The value of this property will take the form of hdfs: //nn-host1:rpc-port. </description> </property>
        Hide
        Suresh Srinivas added a comment -

        The document change looks good. I will review the patch in a short while.

        Show
        Suresh Srinivas added a comment - The document change looks good. I will review the patch in a short while.
        Hide
        Suresh Srinivas added a comment -

        +1 for the code change.

        Show
        Suresh Srinivas added a comment - +1 for the code change.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch to branch-1. Thank you Mostafa.

        Show
        Suresh Srinivas added a comment - I committed the patch to branch-1. Thank you Mostafa.
        Hide
        Matt Foley added a comment -

        Closed upon release of Hadoop 1.2.0.

        Show
        Matt Foley added a comment - Closed upon release of Hadoop 1.2.0.
        Hide
        Chuan Liu added a comment -

        We need to reopen this JIRA for 2.0/trunk code base. I think the original trunk patch did have some problems. We should use the existing key "dfs.namenode.rpc-address" instead of creating the new key "dfs.namenode.address".

        Show
        Chuan Liu added a comment - We need to reopen this JIRA for 2.0/trunk code base. I think the original trunk patch did have some problems. We should use the existing key "dfs.namenode.rpc-address" instead of creating the new key "dfs.namenode.address".
        Hide
        Chuan Liu added a comment -

        Attaching a new patch; the fix is the same as previous one only using the existing key "dfs.namenode.rpc-address". I believe this is correct behavior because the error message suggests the address should be "dfs.namenode.rpc-address" in validateConfigurationSettings(final Configuration conf) method.

        Show
        Chuan Liu added a comment - Attaching a new patch; the fix is the same as previous one only using the existing key "dfs.namenode.rpc-address". I believe this is correct behavior because the error message suggests the address should be "dfs.namenode.rpc-address" in validateConfigurationSettings(final Configuration conf) method.
        Hide
        Chuan Liu added a comment -

        I created a new JIRA HDFS-5227 to track the issue in trunk.

        Show
        Chuan Liu added a comment - I created a new JIRA HDFS-5227 to track the issue in trunk.

          People

          • Assignee:
            Mostafa Elhemali
            Reporter:
            Mostafa Elhemali
          • Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development