hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankit Singhal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-15260) Should we check zero length value in checkAndMutate when null is passes as expected value?
Date Fri, 12 Feb 2016 17:39:18 GMT

     [ https://issues.apache.org/jira/browse/HBASE-15260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ankit Singhal updated HBASE-15260:
----------------------------------
    Description: 
Should we check zero length value in checkAndMutate when null is passes as expected value?
If yes, then I think we should update the documentation for checkAndPut with the same as sometimes
column are used for marker with empty byte array.
{code}
If the passed value is null, the check
   * is for the lack of column (ie: non-existance)
boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
    byte[] value, Put put) throws IOException;
{code}

otherwise , we should remove this check.
{code}
HRegion.class

@Override
  public boolean checkAndMutate(byte [] row, byte [] family, byte [] qualifier,
      CompareOp compareOp, ByteArrayComparable comparator, Mutation w,
      boolean writeToWAL)
  throws IOException{
...
else if (result.size() > 0 && result.get(0).getValueLength() == 0 &&
            valueIsNull) {
          matches = true;
        }

 {code}


  was:
Should we check zero length value in checkAndMutate when null is passes as expected value?
If yes, then I think we should update the documentation for checkAndPut with the same as sometimes
column are used for marker with no empty byte array.
{code}
If the passed value is null, the check
   * is for the lack of column (ie: non-existance)
boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
    byte[] value, Put put) throws IOException;
{code}

otherwise , we should remove this check.
{code}
HRegion.class

@Override
  public boolean checkAndMutate(byte [] row, byte [] family, byte [] qualifier,
      CompareOp compareOp, ByteArrayComparable comparator, Mutation w,
      boolean writeToWAL)
  throws IOException{
...
else if (result.size() > 0 && result.get(0).getValueLength() == 0 &&
            valueIsNull) {
          matches = true;
        }

 {code}



> Should we check zero length value in checkAndMutate when null is passes as expected value?
> ------------------------------------------------------------------------------------------
>
>                 Key: HBASE-15260
>                 URL: https://issues.apache.org/jira/browse/HBASE-15260
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ankit Singhal
>
> Should we check zero length value in checkAndMutate when null is passes as expected value?
> If yes, then I think we should update the documentation for checkAndPut with the same
as sometimes column are used for marker with empty byte array.
> {code}
> If the passed value is null, the check
>    * is for the lack of column (ie: non-existance)
> boolean checkAndPut(byte[] row, byte[] family, byte[] qualifier,
>     byte[] value, Put put) throws IOException;
> {code}
> otherwise , we should remove this check.
> {code}
> HRegion.class
> @Override
>   public boolean checkAndMutate(byte [] row, byte [] family, byte [] qualifier,
>       CompareOp compareOp, ByteArrayComparable comparator, Mutation w,
>       boolean writeToWAL)
>   throws IOException{
> ...
> else if (result.size() > 0 && result.get(0).getValueLength() == 0 &&
>             valueIsNull) {
>           matches = true;
>         }
>  {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message