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

Arguments check for ErasureCodingPolicy->composePolicyName

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha3
    • 3.0.0-alpha4
    • hdfs-client
    • None
    • Reviewed
    • Patch

    Description

      Function composePolicyName is called by ErasureCodingPolicy, but both of them are not judge the arguments not NULL.It 's better to judge in the function composePolicyName.

      Attachments

        1. HDFS-11933.001.patch
          2 kB
          lufei

        Activity

          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 13s 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 13m 55s trunk passed
          +1 compile 0m 33s trunk passed
          +1 checkstyle 0m 17s trunk passed
          +1 mvnsite 0m 37s trunk passed
          +1 findbugs 1m 27s trunk passed
          +1 javadoc 0m 22s trunk passed
          +1 mvninstall 0m 42s the patch passed
          +1 compile 0m 39s the patch passed
          +1 javac 0m 39s the patch passed
          +1 checkstyle 0m 15s the patch passed
          +1 mvnsite 0m 42s the patch passed
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 findbugs 1m 53s the patch passed
          +1 javadoc 0m 24s the patch passed
          +1 unit 1m 27s hadoop-hdfs-client in the patch passed.
          +1 asflicense 0m 26s The patch does not generate ASF License warnings.
          25m 25s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:14b5c93
          JIRA Issue HDFS-11933
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12871460/HDFS-11933.001.patch
          Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle
          uname Linux 7b9e96582fc2 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 6a28a2b
          Default Java 1.8.0_131
          findbugs v3.1.0-RC1
          Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19783/testReport/
          modules C: hadoop-hdfs-project/hadoop-hdfs-client U: hadoop-hdfs-project/hadoop-hdfs-client
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19783/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 13s 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 13m 55s trunk passed +1 compile 0m 33s trunk passed +1 checkstyle 0m 17s trunk passed +1 mvnsite 0m 37s trunk passed +1 findbugs 1m 27s trunk passed +1 javadoc 0m 22s trunk passed +1 mvninstall 0m 42s the patch passed +1 compile 0m 39s the patch passed +1 javac 0m 39s the patch passed +1 checkstyle 0m 15s the patch passed +1 mvnsite 0m 42s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 findbugs 1m 53s the patch passed +1 javadoc 0m 24s the patch passed +1 unit 1m 27s hadoop-hdfs-client in the patch passed. +1 asflicense 0m 26s The patch does not generate ASF License warnings. 25m 25s Subsystem Report/Notes Docker Image:yetus/hadoop:14b5c93 JIRA Issue HDFS-11933 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12871460/HDFS-11933.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit findbugs checkstyle uname Linux 7b9e96582fc2 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 6a28a2b Default Java 1.8.0_131 findbugs v3.1.0-RC1 Test Results https://builds.apache.org/job/PreCommit-HDFS-Build/19783/testReport/ modules C: hadoop-hdfs-project/hadoop-hdfs-client U: hadoop-hdfs-project/hadoop-hdfs-client Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19783/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          vagarychen Chen Liang added a comment -

          Thanks figo for the patch. v001 patch looks reasonable to me, I wonder though, have you encountered cases where composePolicyName was given invalid arguments? I checked some (but not all) of the callers, seems at least ECSchema schema won't be null for these places.

          vagarychen Chen Liang added a comment - Thanks figo for the patch. v001 patch looks reasonable to me, I wonder though, have you encountered cases where composePolicyName was given invalid arguments? I checked some (but not all) of the callers, seems at least ECSchema schema won't be null for these places.
          figo lufei added a comment -

          Thanks vagarychen for the review.So far I have not yet met composePolicyName was given invalid arguments. But I think after the valid check on these parameters, function composePolicyName may be safer and it can also prevent problems caused by subsequent changes(give invalid arguments's callers).

          figo lufei added a comment - Thanks vagarychen for the review.So far I have not yet met composePolicyName was given invalid arguments. But I think after the valid check on these parameters, function composePolicyName may be safer and it can also prevent problems caused by subsequent changes(give invalid arguments's callers).
          figo lufei added a comment -

          Hi drankye ,Can you do me a faver to review this code.
          Thanks.

          figo lufei added a comment - Hi drankye ,Can you do me a faver to review this code. Thanks.
          drankye Kai Zheng added a comment -

          It's good to have the check and added tests. +1.

          drankye Kai Zheng added a comment - It's good to have the check and added tests. +1.
          drankye Kai Zheng added a comment -

          Committed to trunk. Thanks figo for the contribution and vagarychen for the review!

          drankye Kai Zheng added a comment - Committed to trunk. Thanks figo for the contribution and vagarychen for the review!
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11900 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11900/)
          HDFS-11933. Arguments check for ErasureCodingPolicy->composePolicyName. (kai.zheng: rev a010b330e7797d2ecb5b01ec69ea40438579602f)

          • (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java
          • (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/protocol/TestErasureCodingPolicy.java
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11900 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11900/ ) HDFS-11933 . Arguments check for ErasureCodingPolicy->composePolicyName. (kai.zheng: rev a010b330e7797d2ecb5b01ec69ea40438579602f) (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ErasureCodingPolicy.java (edit) hadoop-hdfs-project/hadoop-hdfs-client/src/test/java/org/apache/hadoop/hdfs/protocol/TestErasureCodingPolicy.java
          figo lufei added a comment -

          Thanks drankye, I'm really appreciate for your review and commit.

          figo lufei added a comment - Thanks drankye , I'm really appreciate for your review and commit.

          People

            figo lufei
            figo lufei
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: