You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Evert Arckens (Created) (JIRA)" <ji...@apache.org> on 2012/02/07 17:00:59 UTC

[jira] [Created] (HBASE-5345) CheckAndPut doesn't work when value is empty byte[]

CheckAndPut doesn't work when value is empty byte[]
---------------------------------------------------

                 Key: HBASE-5345
                 URL: https://issues.apache.org/jira/browse/HBASE-5345
             Project: HBase
          Issue Type: Bug
    Affects Versions: 0.92.0
            Reporter: Evert Arckens


When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.

For example:
Put put = new Put(row1);
put.add(fam1, qf1, new byte[0]);
table.put(put);

put = new Put(row1);
put.add(fam1, qf1, val1);
table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false

I think this is related to HBASE-3793 and HBASE-3468.

Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.


--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hudson commented on HBASE-5345:
-------------------------------

Integrated in HBase-TRUNK-security #102 (See [https://builds.apache.org/job/HBase-TRUNK-security/102/])
    HBASE-5345  CheckAndPut doesn't work when value is empty byte[] (Evert Arckens)

tedyu : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu updated HBASE-5345:
------------------------------

    Fix Version/s: 0.92.1
                   0.94.0
         Assignee: Evert Arckens
     Hadoop Flags: Reviewed
    
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu commented on HBASE-5345:
-----------------------------------

Will integrate the patch tomorrow if there is no objection.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hadoop QA commented on HBASE-5345:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12513639/5345.txt
  against trunk revision .

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

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

    -1 javadoc.  The javadoc tool appears to have generated -136 warning messages.

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

    -1 findbugs.  The patch appears to introduce 156 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.thrift2.TestThriftHBaseServiceHandler
                  org.apache.hadoop.hbase.client.TestFromClientSide
                  org.apache.hadoop.hbase.io.hfile.TestHFileBlock
                  org.apache.hadoop.hbase.mapreduce.TestImportTsv
                  org.apache.hadoop.hbase.mapred.TestTableMapReduce
                  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat
                  org.apache.hadoop.hbase.master.TestSplitLogManager

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

This message is automatically generated.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Evert Arckens updated HBASE-5345:
---------------------------------

    Attachment: checkAndMutateEmpty-HBASE-5345.patch

This attachment contains a patch which I believe fixes the issue and has a test added to TestHRegion
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>         Attachments: checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu commented on HBASE-5345:
-----------------------------------

Integrated to 0.92 and TRUNK.

Thanks for the patch, Evert.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hudson commented on HBASE-5345:
-------------------------------

Integrated in HBase-TRUNK #2656 (See [https://builds.apache.org/job/HBase-TRUNK/2656/])
    HBASE-5345  CheckAndPut doesn't work when value is empty byte[] (Evert Arckens)

tedyu : 
Files : 
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hadoop QA commented on HBASE-5345:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12513624/checkAndMutateEmpty-HBASE-5345.patch
  against trunk revision .

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

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

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/910//console

This message is automatically generated.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>         Attachments: checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hudson commented on HBASE-5345:
-------------------------------

Integrated in HBase-0.92-security #91 (See [https://builds.apache.org/job/HBase-0.92-security/91/])
    HBASE-5345  CheckAndPut doesn't work when value is empty byte[] (Evert Arckens) (Revision 1241971)

     Result = FAILURE
tedyu : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu updated HBASE-5345:
------------------------------

    Status: Patch Available  (was: Open)
    
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>         Attachments: checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu updated HBASE-5345:
------------------------------

    Attachment: 5345.txt

Patch which applies to TRUNK.

Please generate patch at the root of hbase workspace.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>         Attachments: 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu updated HBASE-5345:
------------------------------

    Attachment: 5345-v2.txt

We should check whether result is empty before indexing.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hadoop QA commented on HBASE-5345:
----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12513666/5345-v2.txt
  against trunk revision .

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

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

    -1 javadoc.  The javadoc tool appears to have generated -136 warning messages.

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

    -1 findbugs.  The patch appears to introduce 156 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.io.hfile.TestHFileBlock
                  org.apache.hadoop.hbase.mapreduce.TestImportTsv
                  org.apache.hadoop.hbase.mapred.TestTableMapReduce
                  org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat

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

This message is automatically generated.
                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Hudson commented on HBASE-5345:
-------------------------------

Integrated in HBase-0.92 #273 (See [https://builds.apache.org/job/HBase-0.92/273/])
    HBASE-5345  CheckAndPut doesn't work when value is empty byte[] (Evert Arckens)

tedyu : 
Files : 
* /hbase/branches/0.92/CHANGES.txt
* /hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
* /hbase/branches/0.92/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java

                
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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-5345) CheckAndPut doesn't work when value is empty byte[]

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

Zhihong Yu updated HBASE-5345:
------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)
    
> CheckAndPut doesn't work when value is empty byte[]
> ---------------------------------------------------
>
>                 Key: HBASE-5345
>                 URL: https://issues.apache.org/jira/browse/HBASE-5345
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.92.0
>            Reporter: Evert Arckens
>            Assignee: Evert Arckens
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: 5345-v2.txt, 5345.txt, checkAndMutateEmpty-HBASE-5345.patch
>
>
> When a value contains an empty byte[] and then a checkAndPut is performed with an empty byte[] , the operation will fail.
> For example:
> Put put = new Put(row1);
> put.add(fam1, qf1, new byte[0]);
> table.put(put);
> put = new Put(row1);
> put.add(fam1, qf1, val1);
> table.checkAndPut(row1, fam1, qf1, new byte[0], put); ---> false
> I think this is related to HBASE-3793 and HBASE-3468.
> Note that you will also get into this situation when first putting a null value ( put.add(fam1,qf1,null) ), as this value will then be regarded and returned as an empty byte[] upon a get.

--
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