You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Wang Qiang (JIRA)" <ji...@apache.org> on 2012/05/18 16:01:08 UTC

[jira] [Created] (HBASE-6047) Put.has() can't determine result correctly

Wang Qiang created HBASE-6047:
---------------------------------

             Summary: Put.has() can't determine result correctly
                 Key: HBASE-6047
                 URL: https://issues.apache.org/jira/browse/HBASE-6047
             Project: HBase
          Issue Type: Bug
          Components: client
    Affects Versions: 0.92.1
            Reporter: Wang Qiang


the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
else if (ignoreValue) {
      for (KeyValue kv: list) {
        if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
            && kv.getTimestamp() == ts) {
          return true;
        }
      }
    }
the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!

Put put = new Put(Bytes.toBytes("row-01"));
put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
				1234567L, Bytes.toBytes("value-01"));
System.out.println(put.has(Bytes.toBytes("family-01"),
				Bytes.toBytes("qualifier-01")));

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu commented on HBASE-6047:
-----------------------------------

Integrated to 0.92, 0.94 and trunk.

Thanks for the patch, Alex.

Thanks for reporting the issue, Qiang Wang.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

ramkrishna.s.vasudevan commented on HBASE-6047:
-----------------------------------------------

@Alex
The hudson has taken up the patch and it is available in the versions where ever the patch has gone in.
There are some test case failures caused in the build due to which the hudson says it has failed in creating a build.  May be you can just cross check from the build report whether your patch has caused any failures. 
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (HBASE-6047) Put.has() can't determine result correctly

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

Lars Hofhansl closed HBASE-6047.
--------------------------------

    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: Client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.94.1, 0.96.0
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
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-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

Interesting. I hate to be dense. But I'm not sure what else I can do on this jira?
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman reassigned HBASE-6047:
----------------------------------

    Assignee: Alex Newman
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hadoop QA commented on HBASE-6047:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12528661/0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch
  against trunk revision .

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

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

    +1 hadoop23.  The patch compiles against the hadoop 0.23.x profile.

    +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 appears to introduce 33 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.replication.TestReplication
                  org.apache.hadoop.hbase.replication.TestMultiSlaveReplication
                  org.apache.hadoop.hbase.replication.TestMasterReplication

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1960//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1960//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1960//console

This message is automatically generated.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

I added a bunch of tests. The getvalue stuff didn't seem to work as well. 
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu updated HBASE-6047:
------------------------------

    Fix Version/s: 0.94.1
                   0.96.0
                   0.92.2
     Hadoop Flags: Reviewed
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

think i got your comments
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu updated HBASE-6047:
------------------------------

    Status: Open  (was: Patch Available)
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #14 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/14/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341737)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Wang Qiang commented on HBASE-6047:
-----------------------------------

        @Test
	public void testHas() {
		Put put = new Put(Bytes.toBytes("row-01"));
		put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
				1234567L, Bytes.toBytes("value-01"));

		Assert.assertTrue(put.has(Bytes.toBytes("family-01"),
				Bytes.toBytes("qualifier-01")));
	}
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

ramkrishna.s.vasudevan commented on HBASE-6047:
-----------------------------------------------

I have raised HBASE-6100 to address the test case failures in 0.94.
In 0.92 i see that TestLocalHBaseCluster is failing due to
{code}
Starting shutdown.
org.apache.hadoop.hbase.util.FileSystemVersionException: File system needs to be upgraded.  You have version null and I want version 7.  Run the '${HBASE_HOME}/bin/hbase migrate' script.
{code}

We need to correct this across all branches i feel.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu commented on HBASE-6047:
-----------------------------------

The 3 test failures were not due to this change.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-0.94 #209 (See [https://builds.apache.org/job/HBase-0.94/209/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341740)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-0.92 #417 (See [https://builds.apache.org/job/HBase-0.92/417/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341741)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu commented on HBASE-6047:
-----------------------------------

Can you put the second code snippet into a test and provide a patch ?

Thanks
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu updated HBASE-6047:
------------------------------

    Description: 
the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
{code}
else if (ignoreValue) {
      for (KeyValue kv: list) {
        if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
            && kv.getTimestamp() == ts) {
          return true;
        }
      }
    }
{code}
the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
{code}
Put put = new Put(Bytes.toBytes("row-01"));
put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
				1234567L, Bytes.toBytes("value-01"));
System.out.println(put.has(Bytes.toBytes("family-01"),
				Bytes.toBytes("qualifier-01")));
{code}

  was:
the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
else if (ignoreValue) {
      for (KeyValue kv: list) {
        if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
            && kv.getTimestamp() == ts) {
          return true;
        }
      }
    }
the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!

Put put = new Put(Bytes.toBytes("row-01"));
put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
				1234567L, Bytes.toBytes("value-01"));
System.out.println(put.has(Bytes.toBytes("family-01"),
				Bytes.toBytes("qualifier-01")));

    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hadoop QA commented on HBASE-6047:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12528663/0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch
  against trunk revision .

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

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

    +1 hadoop23.  The patch compiles against the hadoop 0.23.x profile.

    +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 appears to introduce 33 new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

     -1 core tests.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.replication.TestReplication
                  org.apache.hadoop.hbase.replication.TestMultiSlaveReplication
                  org.apache.hadoop.hbase.replication.TestMasterReplication
                  org.apache.hadoop.hbase.master.TestSplitLogManager

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//artifact/trunk/patchprocess/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/1961//console

This message is automatically generated.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

Ooh I think I fixed it as well :)
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Wang Qiang updated HBASE-6047:
------------------------------

    Attachment: PutTest.java
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>         Attachments: PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu resolved HBASE-6047.
-------------------------------

    Resolution: Fixed
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman updated HBASE-6047:
-------------------------------

    Attachment: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

Could someone translate the hudson. Is this patch still working or do I need to rebase on to some branches. The robot's output confuses this human.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu commented on HBASE-6047:
-----------------------------------

Please add license to TestPutHas.java
{code}
+@Category(SmallTests.class)^M
+public class TestPutHas {^M
{code}
Please add javadoc for the test class.
I don't have a very good name for this class: TestPutDotHas ?
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu commented on HBASE-6047:
-----------------------------------

Thanks for the quick turnaround.

+1 on patch v2.

Minor comment:
{code}
+ * Copyright 2012 The Apache Software Foundation^M
{code}
Year is not needed.
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-0.94-security #29 (See [https://builds.apache.org/job/HBase-0.94-security/29/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341740)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman commented on HBASE-6047:
------------------------------------

*ramkrishna sorry to be dense, but just so I understand what you want me to do. I looked at the jenkins builds and it looks like we are having flakey test issues. Sounds like I know what my next jira is. Can you confirm that I am correct in my diagnosis?
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-TRUNK #2915 (See [https://builds.apache.org/job/HBase-TRUNK/2915/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341737)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman updated HBASE-6047:
-------------------------------

    Attachment: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Zhihong Yu updated HBASE-6047:
------------------------------

    Attachment: 6047-92.txt

Patch for 0.92 branch
                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-6047) Put.has() can't determine result correctly

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

Hudson commented on HBASE-6047:
-------------------------------

Integrated in HBase-0.92-security #108 (See [https://builds.apache.org/job/HBase-0.92-security/108/])
    HBASE-6047 Put.has() can't determine result correctly (Alex Newman) (Revision 1341741)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/client/Put.java
* /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/client/TestPutDotHas.java

                
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>             Fix For: 0.92.2, 0.96.0, 0.94.1
>
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly-v2.patch, 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, 6047-92.txt, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-6047) Put.has() can't determine result correctly

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

Alex Newman updated HBASE-6047:
-------------------------------

    Status: Patch Available  (was: Open)
    
> Put.has() can't determine result correctly
> ------------------------------------------
>
>                 Key: HBASE-6047
>                 URL: https://issues.apache.org/jira/browse/HBASE-6047
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 0.92.1
>            Reporter: Wang Qiang
>            Assignee: Alex Newman
>         Attachments: 0001-HBASE-6047.-Put.has-can-t-determine-result-correctly.patch, PutTest.java
>
>
> the public method 'has(byte [] family, byte [] qualifier)' internally invoked the private method 'has(byte [] family, byte [] qualifier, long ts, byte [] value, boolean ignoreTS, boolean ignoreValue)' with 'value=new byte[0], ignoreTS=true, ignoreValue=true', but there's a logical error in the body, it'll enter the block
> {code}
> else if (ignoreValue) {
>       for (KeyValue kv: list) {
>         if (Arrays.equals(kv.getFamily(), family) && Arrays.equals(kv.getQualifier(), qualifier)
>             && kv.getTimestamp() == ts) {
>           return true;
>         }
>       }
>     }
> {code}
> the expression 'kv.getTimestamp() == ts' in the if conditions should only exist when 'ignoreTS=false', otherwise, the following code will return false!
> {code}
> Put put = new Put(Bytes.toBytes("row-01"));
> put.add(Bytes.toBytes("family-01"), Bytes.toBytes("qualifier-01"),
> 				1234567L, Bytes.toBytes("value-01"));
> System.out.println(put.has(Bytes.toBytes("family-01"),
> 				Bytes.toBytes("qualifier-01")));
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira