HBase
  1. HBase
  2. HBASE-10824

Enhance detection of protobuf generated code in line length check

    Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.99.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      In review of HBASE-5175, Anoop found that long line detection wasn't very effective for protobuf generated code.
      Here is one example:

      -1 lineLengths. The patch introduces the following lines longer than 100:
      + private DoubleMsg(boolean noInit)
      { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
      

      This is current filter:

        lines=`cat $PATCH_DIR/patch | grep "^+" | grep -v "^@@" | grep -v "^+++" | grep -v "import" | grep -v "hbase.protobuf.generated" | awk -v len="$MAX_LINE_LENGTH_PATCH"    'length ($0) > len' | head -n 10`
      

      'com.google.protobuf.' should be considered as well.

        Activity

        Ted Yu created issue -
        Ted Yu made changes -
        Field Original Value New Value
        Assignee Ted Yu [ yuzhihong@gmail.com ]
        Ted Yu made changes -
        Summary Enhance detection of protobuf generated code in line length detection Enhance detection of protobuf generated code in line length check
        Ted Yu made changes -
        Attachment 10824-v1.txt [ 12636513 ]
        Ted Yu made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12636513/10824-v1.txt
        against trunk revision .
        ATTACHMENT ID: 12636513

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

        +1 tests included. The patch appears to include 3 new or modified tests.

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

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

        +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 lineLengths. The patch does not introduce lines longer than 100

        +1 site. The mvn site goal succeeds with this patch.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
        Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//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/12636513/10824-v1.txt against trunk revision . ATTACHMENT ID: 12636513 +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 3 new or modified tests. +1 javadoc . The javadoc tool did not generate any warning messages. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +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 lineLengths . The patch does not introduce lines longer than 100 +1 site . The mvn site goal succeeds with this patch. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/9084//console This message is automatically generated.
        Hide
        Anoop Sam John added a comment -

        LGTM
        Still if the protobuf generate a line of code in which "com.google.protobuf" or "hbase.protobuf.generated" is not coming and line length >100, it might show us wrong report. But normally this wont happen I guess.. With this patch we are in better position. +1 for commit.

        Show
        Anoop Sam John added a comment - LGTM Still if the protobuf generate a line of code in which "com.google.protobuf" or "hbase.protobuf.generated" is not coming and line length >100, it might show us wrong report. But normally this wont happen I guess.. With this patch we are in better position. +1 for commit.
        Ted Yu made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.99.0 [ 12325675 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in HBase-TRUNK #5039 (See https://builds.apache.org/job/HBase-TRUNK/5039/)
        HBASE-10824 Enhance detection of protobuf generated code in line length check (tedyu: rev 1581361)

        • /hbase/trunk/dev-support/test-patch.sh
        Show
        Hudson added a comment - SUCCESS: Integrated in HBase-TRUNK #5039 (See https://builds.apache.org/job/HBase-TRUNK/5039/ ) HBASE-10824 Enhance detection of protobuf generated code in line length check (tedyu: rev 1581361) /hbase/trunk/dev-support/test-patch.sh
        Hide
        ramkrishna.s.vasudevan added a comment -

        +1 on this. Many patches were getting reported as > 100 lines.

        Show
        ramkrishna.s.vasudevan added a comment - +1 on this. Many patches were getting reported as > 100 lines.
        Hide
        Enis Soztutar added a comment -

        Closing this issue after 0.99.0 release.

        Show
        Enis Soztutar added a comment - Closing this issue after 0.99.0 release.
        Enis Soztutar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Patch Available Patch Available
        1m 58s 1 Ted Yu 25/Mar/14 03:36
        Patch Available Patch Available Resolved Resolved
        11h 14m 1 Ted Yu 25/Mar/14 14:50
        Resolved Resolved Closed Closed
        333d 8h 40m 1 Enis Soztutar 21/Feb/15 23:30

          People

          • Assignee:
            Ted Yu
            Reporter:
            Ted Yu
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development