Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: hdfs-client
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      Scenario : Setting up multiple nameservices with HA configuration for each nameservice (manual failover)
      After starting the journal nodes and namenodes, both the nodes are in standby mode.

      all the following haadmin commands

      haadmin
      -transitionToActive
      -transitionToStandby
      -failover
      -getServiceState
      -checkHealth

      failed with exception
      Illegal argument: Unable to determine the nameservice id.

      1. HDFS-8067-01.patch
        1 kB
        Ajith S
      2. HDFS-8067-02.patch
        0.6 kB
        Ajith S

        Issue Links

          Activity

          Hide
          ajithshetty Ajith S added a comment -

          After analysis i found that the cause is

          NNHAServiceTarget.java
           public NNHAServiceTarget(Configuration conf,
                String nsId, String nnId) {
              Preconditions.checkNotNull(nnId);
              
              if (nsId == null) {
                nsId = DFSUtil.getOnlyNameServiceIdOrNull(conf);
                if (nsId == null) {
                  throw new IllegalArgumentException(
                      "Unable to determine the nameservice id.");
                }
              }
          ......
          

          Here, by using

           getOnlyNameServiceIdOrNull(conf) 

          to determine the nameserviceID, when configured in a Federated setup which has multiple nameservices, returns null. This was updated as part of HDFS-3084
          I am thinking to change it to

           getNamenodeNameServiceId(conf) 

          Please suggest

          Show
          ajithshetty Ajith S added a comment - After analysis i found that the cause is NNHAServiceTarget.java public NNHAServiceTarget(Configuration conf, String nsId, String nnId) { Preconditions.checkNotNull(nnId); if (nsId == null ) { nsId = DFSUtil.getOnlyNameServiceIdOrNull(conf); if (nsId == null ) { throw new IllegalArgumentException( "Unable to determine the nameservice id." ); } } ...... Here, by using getOnlyNameServiceIdOrNull(conf) to determine the nameserviceID, when configured in a Federated setup which has multiple nameservices, returns null. This was updated as part of HDFS-3084 I am thinking to change it to getNamenodeNameServiceId(conf) Please suggest
          Hide
          dlmarion Dave Marion added a comment -

          You need to specify the nameservice with which you want to interact. For example, if you have ns1 and ns2, and you want to failover from nn1 to nn2, then you would:

          haadmin -ns ns1 -failover nn2 nn1

          Show
          dlmarion Dave Marion added a comment - You need to specify the nameservice with which you want to interact. For example, if you have ns1 and ns2, and you want to failover from nn1 to nn2, then you would: haadmin -ns ns1 -failover nn2 nn1
          Hide
          ajithshetty Ajith S added a comment -

          Thanks for the comment Dave. But i think the -ns option is somehow got removed after HDFS-7808 and HDFS-7324

          Show
          ajithshetty Ajith S added a comment - Thanks for the comment Dave. But i think the -ns option is somehow got removed after HDFS-7808 and HDFS-7324
          Hide
          szetszwo Tsz Wo Nicholas Sze added a comment -

          This is a 2.7 blocker.

          Show
          szetszwo Tsz Wo Nicholas Sze added a comment - This is a 2.7 blocker.
          Hide
          ajithshetty Ajith S added a comment -

          Submitting the patch. (reverted the changes in HDFS-7808) and (corrected HDFS-7324). Please review the same

          Show
          ajithshetty Ajith S added a comment - Submitting the patch. (reverted the changes in HDFS-7808 ) and (corrected HDFS-7324 ). Please review the same
          Hide
          ajithshetty Ajith S added a comment -

          Thanks for the issue update

          Show
          ajithshetty Ajith S added a comment - Thanks for the issue update
          Hide
          ajithshetty Ajith S added a comment -

          Thanks for the issue update

          Show
          ajithshetty Ajith S added a comment - Thanks for the issue update
          Hide
          hadoopqa Hadoop QA added a comment -

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

          +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. There were no new javadoc warning messages.

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

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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.

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

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12723837/HDFS-8067-01.patch against trunk revision ab04ff9. +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 . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10207//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10207//console This message is automatically generated.
          Hide
          wheat9 Haohui Mai added a comment -

          Reverted HDFS-7808 and HDFS-7813 in trunk, branch-2, and branch-2.7. This should unblock 2.7. cc Vinod Kumar Vavilapalli

          Ajith S, do you want to update your patch to bring back the changes on updating the help messages in 2.8?

          Show
          wheat9 Haohui Mai added a comment - Reverted HDFS-7808 and HDFS-7813 in trunk, branch-2, and branch-2.7. This should unblock 2.7. cc Vinod Kumar Vavilapalli Ajith S , do you want to update your patch to bring back the changes on updating the help messages in 2.8?
          Hide
          ajithshetty Ajith S added a comment -

          Yes ill update the patch for help message

          Show
          ajithshetty Ajith S added a comment - Yes ill update the patch for help message
          Hide
          ajithshetty Ajith S added a comment -

          Updated with HDFS-8067-02.patch

          Show
          ajithshetty Ajith S added a comment - Updated with HDFS-8067 -02.patch
          Hide
          hadoopqa Hadoop QA added a comment -

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

          +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. There were no new javadoc warning messages.

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

          +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) 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.

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

          This message is automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12724124/HDFS-8067-02.patch against trunk revision dc0282d. +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 . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) 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. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/10225//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/10225//console This message is automatically generated.
          Hide
          vinayrpet Vinayakumar B added a comment -

          +1 for the latest patch.
          Will commit soon.

          Show
          vinayrpet Vinayakumar B added a comment - +1 for the latest patch. Will commit soon.
          Hide
          vinayrpet Vinayakumar B added a comment -

          Committed to trunk and branch-2.
          Thanks all

          Show
          vinayrpet Vinayakumar B added a comment - Committed to trunk and branch-2. Thanks all
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-trunk-Commit #7769 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7769/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-trunk-Commit #7769 (See https://builds.apache.org/job/Hadoop-trunk-Commit/7769/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk #921 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/921/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk #921 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/921/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #190 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/190/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Yarn-trunk-Java8 #190 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/190/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk #2119 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2119/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk #2119 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2119/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #179 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/179/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #179 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/179/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Hadoop-Mapreduce-trunk #2137 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2137/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2137 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2137/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #189 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/189/)
          HDFS-8067. haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb)

          • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java
          • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #189 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/189/ ) HDFS-8067 . haadmin prints out stale help messages (Contributed by Ajith S) (vinayakumarb: rev 66988476d09a6d04c0b81a663db1e6e5a28c37fb) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSHAAdmin.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
          Hide
          zhangrunlin Franklin added a comment -

          Great

          Show
          zhangrunlin Franklin added a comment - Great

            People

            • Assignee:
              ajithshetty Ajith S
              Reporter:
              ajithshetty Ajith S
            • Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development