You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "liang xie (JIRA)" <ji...@apache.org> on 2012/10/17 10:38:03 UTC

[jira] [Created] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

liang xie created HBASE-7000:
--------------------------------

             Summary: Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
                 Key: HBASE-7000
                 URL: https://issues.apache.org/jira/browse/HBASE-7000
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.96.0
            Reporter: liang xie
            Assignee: liang xie
            Priority: Minor




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "liang xie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

liang xie updated HBASE-7000:
-----------------------------

    Attachment: HBASE-7000-v2.patch

Attached v2 patch addressed Ted's comments
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479494#comment-13479494 ] 

Hudson commented on HBASE-7000:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #227 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/227/])
    HBASE-7000 Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class (Liang Xie) (Revision 1399740)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java

                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479237#comment-13479237 ] 

Hudson commented on HBASE-7000:
-------------------------------

Integrated in HBase-TRUNK #3458 (See [https://builds.apache.org/job/HBase-TRUNK/3458/])
    HBASE-7000 Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class (Liang Xie) (Revision 1399740)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java

                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478391#comment-13478391 ] 

Ted Yu commented on HBASE-7000:
-------------------------------

patch looks good.
nit: insert space before 1:
{code}
+  public static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE -1;
{code}
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "liang xie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477794#comment-13477794 ] 

liang xie commented on HBASE-7000:
----------------------------------

IMHO, the HConstants.MAXIMUM_VALUE_LENGTH maybe changed in future, so the check statement should be always be there for safety
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "liang xie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

liang xie updated HBASE-7000:
-----------------------------

    Status: Patch Available  (was: Open)
    
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478647#comment-13478647 ] 

Hadoop QA commented on HBASE-7000:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12549626/HBASE-7000-v2.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  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.

    {color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 2.0 profile.

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 82 warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:red}-1 findbugs{color}.  The patch appears to introduce 4 new Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.backup.example.TestZooKeeperTableArchiveClient
                  org.apache.hadoop.hbase.catalog.TestMetaReaderEditor

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3071//console

This message is automatically generated.
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13479157#comment-13479157 ] 

Ted Yu commented on HBASE-7000:
-------------------------------

The two failed tests are flaky.

Integrated to trunk.

Thanks for the patch Liang.
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "liang xie (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

liang xie updated HBASE-7000:
-----------------------------

    Attachment: HBASE-7000.patch

there're two choices here.
1 attached file shows change to some value not the old Integer.MAX_VALUE

2 modify KeyValue.java, remove the following code:
    if (vlength > HConstants.MAXIMUM_VALUE_LENGTH) { // FindBugs INT_VACUOUS_COMPARISON
      throw new IllegalArgumentException("Value length " + vlength + " > " +
          HConstants.MAXIMUM_VALUE_LENGTH);
    }
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-7000:
--------------------------

       Resolution: Fixed
    Fix Version/s: 0.96.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)
    
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7000.patch, HBASE-7000-v2.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477816#comment-13477816 ] 

Hadoop QA commented on HBASE-7000:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12549488/HBASE-7000.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  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.

    {color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 2.0 profile.

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 82 warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:red}-1 findbugs{color}.  The patch appears to introduce 4 new Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.backup.example.TestZooKeeperTableArchiveClient
                  org.apache.hadoop.hbase.master.TestSplitLogManager

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3061//console

This message is automatically generated.
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7000) Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class

Posted by "liang xie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477795#comment-13477795 ] 

liang xie commented on HBASE-7000:
----------------------------------

BTW, the WARING was caused by :
an integer comparison(vlength > Integer.MAX_VALUE) that always returns the same value
                
> Fix the "INT_VACUOUS_COMPARISON" WARNING in KeyValue class
> ----------------------------------------------------------
>
>                 Key: HBASE-7000
>                 URL: https://issues.apache.org/jira/browse/HBASE-7000
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.96.0
>            Reporter: liang xie
>            Assignee: liang xie
>            Priority: Minor
>         Attachments: HBASE-7000.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira