hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-13779) Calling table.exists() before table.get() end up with an empty Result
Date Fri, 29 May 2015 00:38:32 GMT

    [ https://issues.apache.org/jira/browse/HBASE-13779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14563997#comment-14563997
] 

Hadoop QA commented on HBASE-13779:
-----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12735974/HBASE-13779-v0.patch
  against master branch at commit 4aa7209826ae42e47089fd20747d014183fccb6f.
  ATTACHMENT ID: 12735974

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

    {color:green}+1 tests included{color}.  The patch appears to include 3 new or modified
tests.

    {color:green}+1 hadoop versions{color}. The patch compiles with all supported hadoop versions
(2.4.1 2.5.2 2.6.0)

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

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

    {color:green}+1 javadoc{color}.  The javadoc tool did not generate any warning messages.

    {color:green}+1 checkstyle{color}.  The applied patch does not increase the total number
of checkstyle errors

    {color:green}+1 findbugs{color}.  The patch does not introduce any  new Findbugs (version
2.0.3) warnings.

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

    {color:green}+1 lineLengths{color}.  The patch does not introduce lines longer than 100

  {color:green}+1 site{color}.  The mvn site goal succeeds with this patch.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
     

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/14224//testReport/
Release Findbugs (version 2.0.3) 	warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/14224//artifact/patchprocess/newFindbugsWarnings.html
Checkstyle Errors: https://builds.apache.org/job/PreCommit-HBASE-Build/14224//artifact/patchprocess/checkstyle-aggregate.html

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

This message is automatically generated.

> Calling table.exists() before table.get() end up with an empty Result
> ---------------------------------------------------------------------
>
>                 Key: HBASE-13779
>                 URL: https://issues.apache.org/jira/browse/HBASE-13779
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 1.1.0, 1.2.0, 0.98.12.1
>            Reporter: Matteo Bertozzi
>            Assignee: Matteo Bertozzi
>         Attachments: HBASE-13779-test.patch, HBASE-13779-v0.patch
>
>
> If we call exists() before a get() the result returned by the get() will be empty.
> simple test to verify it:
> {code}
> Put put = new Put(ROW);
> put.add(FAMILY, QUALIFIER, VALUE);
> table.put(put);
> Get get = new Get(ROW);
> boolean exist = table.exists(get);
> exist = table.exists(get);
> assertEquals(true, exist);
> Result result = table.get(get);
> // this will fail saying that the Result is empty
> // if we remove the exist everything is fine
> assertEquals(false, result.isEmpty()); 
> assertTrue(Bytes.equals(VALUE, result.getValue(FAMILY, QUALIFIER)));
> {code}
> if we use a different Get instance for the get everything works
> {code}
> ...
> get = new Get(ROW);
> Result result = table.get(get);
> assertEquals(false, result.isEmpty()); 
> {code}
> HTable.exists() set the checkExistenceOnly flag in the Get so that object is not reusable
by a table.get()
> {code}
>   public boolean exists(final Get get) throws IOException {
>     get.setCheckExistenceOnly(true);
>     Result r = get(get);
>     assert r.getExists() != null;
>     return r.getExists();
>   }
> {code}



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

Mime
View raw message