Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13603

Ignore package line length checkstyle rule

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha2
    • Component/s: build
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The packages related to the DockerLinuxContainerRuntime all exceed the 80 char line length limit enforced by checkstyle. This causes every build to fail with a -1. I would like to exclude this rule from causing a failure.

      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/DockerCommandExecutor.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/DockerContainerStatusHandler.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/package-info.java:23:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/privileged/MockPrivilegedOperationCaptor.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.privileged;: Line is longer than 80 characters (found 84).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/DockerRuntimeTestingUtils.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime;: Line is longer than 80 characters (found 81).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/MockDockerContainerStatusHandler.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/TestDockerCommandExecutor.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      ./hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/docker/TestDockerContainerStatusHandler.java:17:package org.apache.hadoop.yarn.server.nodemanager.containermanager.linux.runtime.docker;: Line is longer than 80 characters (found 88).
      

      Alternatively, we could look to restructure the packages here, but I question what value this check really provides.

        Activity

        Hide
        shanekumpf@gmail.com Shane Kumpf added a comment -

        Thanks Akira Ajisaka!

        Show
        shanekumpf@gmail.com Shane Kumpf added a comment - Thanks Akira Ajisaka !
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10743 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10743/)
        HADOOP-13603. Ignore package line length checkstyle rule. Contributed by (aajisaka: rev 5b577f43a269caeee776a59695427985d0cd1697)

        • (edit) hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10743 (See https://builds.apache.org/job/Hadoop-trunk-Commit/10743/ ) HADOOP-13603 . Ignore package line length checkstyle rule. Contributed by (aajisaka: rev 5b577f43a269caeee776a59695427985d0cd1697) (edit) hadoop-build-tools/src/main/resources/checkstyle/checkstyle.xml
        Hide
        ajisakaa Akira Ajisaka added a comment -

        Committed this to trunk, branch-2, and branch-2.8. Thanks Shane Kumpf for the contribution!

        Show
        ajisakaa Akira Ajisaka added a comment - Committed this to trunk, branch-2, and branch-2.8. Thanks Shane Kumpf for the contribution!
        Hide
        ajisakaa Akira Ajisaka added a comment -

        LGTM +1, upgrading checkstyle version can be separated.

        Show
        ajisakaa Akira Ajisaka added a comment - LGTM +1, upgrading checkstyle version can be separated.
        Hide
        shanekumpf@gmail.com Shane Kumpf added a comment -

        No tests are included as this is a change to the checkstyle rules. I did create a dummy class in the runtime docker package and this rule worked to suppress the package line length error.

        I'm unsure of where the asflicense issues are coming from? Those files are not in my patch and appear unrelated?

        I believe this is ready for review.

        Show
        shanekumpf@gmail.com Shane Kumpf added a comment - No tests are included as this is a change to the checkstyle rules. I did create a dummy class in the runtime docker package and this rule worked to suppress the package line length error. I'm unsure of where the asflicense issues are coming from? Those files are not in my patch and appear unrelated? I believe this is ready for review.
        Hide
        hadoopqa Hadoop QA added a comment -
        -1 overall



        Vote Subsystem Runtime Comment
        0 reexec 0m 15s Docker mode activated.
        +1 @author 0m 0s The patch does not contain any @author tags.
        -1 test4tests 0m 0s 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 mvninstall 7m 10s trunk passed
        +1 compile 0m 8s trunk passed
        +1 mvnsite 0m 9s trunk passed
        +1 mvneclipse 0m 9s trunk passed
        +1 javadoc 0m 9s trunk passed
        +1 mvninstall 0m 6s the patch passed
        +1 compile 0m 5s the patch passed
        +1 javac 0m 5s the patch passed
        +1 mvnsite 0m 5s the patch passed
        +1 mvneclipse 0m 6s the patch passed
        +1 whitespace 0m 0s The patch has no whitespace issues.
        +1 xml 0m 2s The patch has no ill-formed XML file.
        +1 javadoc 0m 6s the patch passed
        +1 unit 0m 6s hadoop-build-tools in the patch passed.
        -1 asflicense 0m 18s The patch generated 2 ASF License warnings.
        9m 27s



        Subsystem Report/Notes
        Docker Image:yetus/hadoop:9560f25
        JIRA Issue HADOOP-13603
        JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12835794/HADOOP-13603.001.patch
        Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit xml
        uname Linux d15135053a7d 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
        Build tool maven
        Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
        git revision trunk / 3de1302
        Default Java 1.8.0_101
        Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/testReport/
        asflicense https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/artifact/patchprocess/patch-asflicense-problems.txt
        modules C: hadoop-build-tools U: hadoop-build-tools
        Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/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 15s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. -1 test4tests 0m 0s 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 mvninstall 7m 10s trunk passed +1 compile 0m 8s trunk passed +1 mvnsite 0m 9s trunk passed +1 mvneclipse 0m 9s trunk passed +1 javadoc 0m 9s trunk passed +1 mvninstall 0m 6s the patch passed +1 compile 0m 5s the patch passed +1 javac 0m 5s the patch passed +1 mvnsite 0m 5s the patch passed +1 mvneclipse 0m 6s the patch passed +1 whitespace 0m 0s The patch has no whitespace issues. +1 xml 0m 2s The patch has no ill-formed XML file. +1 javadoc 0m 6s the patch passed +1 unit 0m 6s hadoop-build-tools in the patch passed. -1 asflicense 0m 18s The patch generated 2 ASF License warnings. 9m 27s Subsystem Report/Notes Docker Image:yetus/hadoop:9560f25 JIRA Issue HADOOP-13603 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12835794/HADOOP-13603.001.patch Optional Tests asflicense compile javac javadoc mvninstall mvnsite unit xml uname Linux d15135053a7d 3.13.0-95-generic #142-Ubuntu SMP Fri Aug 12 17:00:09 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 3de1302 Default Java 1.8.0_101 Test Results https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/testReport/ asflicense https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/artifact/patchprocess/patch-asflicense-problems.txt modules C: hadoop-build-tools U: hadoop-build-tools Console output https://builds.apache.org/job/PreCommit-HADOOP-Build/10914/console Powered by Apache Yetus 0.4.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
        Hide
        shanekumpf@gmail.com Shane Kumpf added a comment -

        This was discussed on the various -dev lists and no objections were raised regarding the removal of the package line length checkstyle rule. I will get a patch up soon.

        See the discussion here:
        http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201610.mbox/%3CCAOqB4e_9O-xN7iEN%2B0GAcxv26eXiEcEKg%2B3nn4ck36cbtdDjYg%40mail.gmail.com%3E

        Show
        shanekumpf@gmail.com Shane Kumpf added a comment - This was discussed on the various -dev lists and no objections were raised regarding the removal of the package line length checkstyle rule. I will get a patch up soon. See the discussion here: http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/201610.mbox/%3CCAOqB4e_9O-xN7iEN%2B0GAcxv26eXiEcEKg%2B3nn4ck36cbtdDjYg%40mail.gmail.com%3E
        Hide
        ajisakaa Akira Ajisaka added a comment -

        I'm +1 for upgrading checkstyle version.

        Show
        ajisakaa Akira Ajisaka added a comment - I'm +1 for upgrading checkstyle version.
        Hide
        ajisakaa Akira Ajisaka added a comment -

        To ignore line length checkstyle rule for package, adding the following setting in checkstyle.xml is fine.

                <module name="LineLength">
                  <property name="ignorePattern" value="^(package|import) .*"/>
                </module>
        

        or we can upgrade checkstyle to 6.12 or upper to fix this issue. https://github.com/checkstyle/checkstyle/issues/2482

        Show
        ajisakaa Akira Ajisaka added a comment - To ignore line length checkstyle rule for package, adding the following setting in checkstyle.xml is fine. <module name= "LineLength" > <property name= "ignorePattern" value= "^( package | import ) .*" /> </module> or we can upgrade checkstyle to 6.12 or upper to fix this issue. https://github.com/checkstyle/checkstyle/issues/2482
        Hide
        shanekumpf@gmail.com Shane Kumpf added a comment -

        Per the comments in YARN-5628, I will start a DISCUSS thread on the -dev lists.

        Show
        shanekumpf@gmail.com Shane Kumpf added a comment - Per the comments in YARN-5628 , I will start a DISCUSS thread on the -dev lists.

          People

          • Assignee:
            shanekumpf@gmail.com Shane Kumpf
            Reporter:
            shanekumpf@gmail.com Shane Kumpf
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development