Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha2
    • Component/s: balancer & mover
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The method Command#getNodeList in DiskBalancer was added in HDFS-9545, but it's never used. We can improve that in the following aspects:

      1.Change private to protected so that the subclass can use that method in the future.
      2.Reuse the method Command#getNodeList and to construct a new method
      like this List<DiskBalancerDataNode> getNodes(String listArg). This method can be used for getting multiple nodes in the future. For example, if we want to use hdfs diskbalancer -report -node or hdfs diskbalancer -plan with multiple specified nodes, that method can be used. Now these commands only support one node.

        Activity

        Hide
        andrew.wang Andrew Wang added a comment -

        Gentle reminder to include the appropriate 3.0.0 fix version when committing to trunk, thanks!

        Show
        andrew.wang Andrew Wang added a comment - Gentle reminder to include the appropriate 3.0.0 fix version when committing to trunk, thanks!
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10378 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10378/)
        HDFS-10813. DiskBalancer: Add the getNodeList method in Command. (aengineer: rev 20ae1fa259b36a7bc11b0f8de1ebf753c858f93c)

        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java
        • (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10378 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10378/ ) HDFS-10813 . DiskBalancer: Add the getNodeList method in Command. (aengineer: rev 20ae1fa259b36a7bc11b0f8de1ebf753c858f93c) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/diskbalancer/command/Command.java (edit) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/diskbalancer/command/TestDiskBalancerCommand.java
        Hide
        anu Anu Engineer added a comment -

        Yiqun Lin Thank you very much for the contribution. I have committed this to trunk.

        Show
        anu Anu Engineer added a comment - Yiqun Lin Thank you very much for the contribution. I have committed this to trunk.
        Hide
        anu Anu Engineer added a comment -

        Yiqun Lin You are right, I was anticipating the change based on the comments, and how the command CLI would change based on using this function. Sorry about the confusion. I will commit this now and hopefully when the CLI changes you can pack the documentation changes along.

        Show
        anu Anu Engineer added a comment - Yiqun Lin You are right, I was anticipating the change based on the comments, and how the command CLI would change based on using this function. Sorry about the confusion. I will commit this now and hopefully when the CLI changes you can pack the documentation changes along.
        Hide
        linyiqun Yiqun Lin added a comment - - edited

        Thanks Anu Engineer for the review.

        could you please file a document JIRA that explains how this feature works. Since the change is the CLI it is good to have the documentation updated too.

        I am some confused here, I just add one utility method in Command and I haven't changed the current CLI. Right? In addition, I will file some JIRAS for supporting multiple specified nodes for hdfs diskbalancer -report -node or other commands after this patch being committed.

        Correct me if I am wrong.
        Thanks.

        Show
        linyiqun Yiqun Lin added a comment - - edited Thanks Anu Engineer for the review. could you please file a document JIRA that explains how this feature works. Since the change is the CLI it is good to have the documentation updated too. I am some confused here, I just add one utility method in Command and I haven't changed the current CLI. Right? In addition, I will file some JIRAS for supporting multiple specified nodes for hdfs diskbalancer -report -node or other commands after this patch being committed. Correct me if I am wrong. Thanks.
        Hide
        anu Anu Engineer added a comment -

        Yiqun Lin Thanks for the patch. I will commit this to trunk. But before I do that, could you please file a document JIRA that explains how this feature works. Since the change is the CLI it is good to have the documentation updated too. As I said you can easily do that in a separate JIRA if you like.

        Show
        anu Anu Engineer added a comment - Yiqun Lin Thanks for the patch. I will commit this to trunk. But before I do that, could you please file a document JIRA that explains how this feature works. Since the change is the CLI it is good to have the documentation updated too. As I said you can easily do that in a separate JIRA if you like.
        Hide
        hadoopqa Hadoop QA added a comment -
        +1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 16s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        +1 test4tests 0m 0s The patch appears to include 1 new or modified test files.
        +1 mvninstall 7m 14s trunk passed
        +1 compile 0m 44s trunk passed
        +1 checkstyle 0m 25s trunk passed
        +1 mvnsite 0m 52s trunk passed
        +1 mvneclipse 0m 12s trunk passed
        +1 findbugs 1m 44s trunk passed
        +1 javadoc 0m 56s trunk passed
        +1 mvninstall 0m 50s the patch passed
        +1 compile 0m 47s the patch passed
        +1 javac 0m 47s the patch passed
        -0 checkstyle 0m 23s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 1 unchanged - 0 fixed = 2 total (was 1)
        +1 mvnsite 0m 56s the patch passed
        +1 mvneclipse 0m 10s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 findbugs 1m 53s the patch passed
        +1 javadoc 0m 54s the patch passed
        +1 unit 58m 10s hadoop-hdfs in the patch passed.
        +1 asflicense 0m 21s The patch does not generate ASF License warnings.
        78m 7s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HDFS-10813
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12825987/HDFS-10813.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
        uname Linux 810a28c56595 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / c258171
        Default Java 1.8.0_101
        findbugs v3.0.0
        checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16563/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
        Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16563/testReport/
        modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
        Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16563/console
        Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org

        This message was automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 16s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 test4tests 0m 0s The patch appears to include 1 new or modified test files. +1 mvninstall 7m 14s trunk passed +1 compile 0m 44s trunk passed +1 checkstyle 0m 25s trunk passed +1 mvnsite 0m 52s trunk passed +1 mvneclipse 0m 12s trunk passed +1 findbugs 1m 44s trunk passed +1 javadoc 0m 56s trunk passed +1 mvninstall 0m 50s the patch passed +1 compile 0m 47s the patch passed +1 javac 0m 47s the patch passed -0 checkstyle 0m 23s hadoop-hdfs-project/hadoop-hdfs: The patch generated 1 new + 1 unchanged - 0 fixed = 2 total (was 1) +1 mvnsite 0m 56s the patch passed +1 mvneclipse 0m 10s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 53s the patch passed +1 javadoc 0m 54s the patch passed +1 unit 58m 10s hadoop-hdfs in the patch passed. +1 asflicense 0m 21s The patch does not generate ASF License warnings. 78m 7s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HDFS-10813 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12825987/HDFS-10813.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 810a28c56595 3.13.0-92-generic #139-Ubuntu SMP Tue Jun 28 20:42:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / c258171 Default Java 1.8.0_101 findbugs v3.0.0 checkstyle https://builds.apache.org/job/PreCommit-HDFS-Build/16563/artifact/patchprocess/diff-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/16563/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/16563/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        linyiqun Yiqun Lin added a comment -

        Attach a initial patch.

        Show
        linyiqun Yiqun Lin added a comment - Attach a initial patch.

          People

          • Assignee:
            linyiqun Yiqun Lin
            Reporter:
            linyiqun Yiqun Lin
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development