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-9115) HTableInterface.append operation may overwrites values
Date Sun, 04 Aug 2013 21:29:49 GMT

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

Hadoop QA commented on HBASE-9115:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12595827/9115-trunk.addendum3
  against trunk revision .

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

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified
tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

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

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

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

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

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

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

    {color: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:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/6598//console

This message is automatically generated.
                
> HTableInterface.append operation may overwrites values
> ------------------------------------------------------
>
>                 Key: HBASE-9115
>                 URL: https://issues.apache.org/jira/browse/HBASE-9115
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.10
>         Environment: MAC OS X 10.8.4, Hbase in the pseudo-distributed mode, hadoop v1.2.0,
Hbase Java API based client.
> *hdfs-site.xml*:
> {code:xml} 
> <configuration>
>      <property>
>          <name>dfs.replication</name>
>          <value>1</value>
>      </property>
>     <property>
>         <name>dfs.support.append</name>
>         <value>true</value>
>     </property>
> </configuration>
> {code}
> *hbase-site.xml*:
> {code:xml} 
> <configuration>
>   <property>
>     <name>hbase.rootdir</name>
>     <value>hdfs://localhost:9000/hbase</value>
>   </property>
>     <property>
>         <name>hbase.cluster.distributed</name>
>         <value>true</value>
>     </property>
>     <property>
>         <name>hbase.zookeeper.quorum</name>
>         <value>localhost</value>
>     </property>
>     <property>
>         <name>dfs.support.append</name>
>         <value>true</value>
>     </property>
> </configuration>
> {code} 
>            Reporter: Aleksandr B
>            Assignee: Ted Yu
>            Priority: Critical
>             Fix For: 0.98.0, 0.95.2, 0.94.11
>
>         Attachments: 9115-0.94.txt, 9115-0.94-v2.txt, 9115-trunk.addendum, 9115-trunk.addendum2,
9115-trunk.addendum3, 9115-trunk.txt
>
>
> I use Hbase Java API and I try to append values Bytes.toBytes("one two") and Bytes.toBytes("
three") in 3 columns.
> Only for 2 out of these 3 columns the result is "one two three".
> *Output from the hbase shell:*
> {noformat} 
> hbase(main):008:0* scan "mytesttable"
> ROW                                    COLUMN+CELL                                  
                                                                 
>  mytestRowKey                          column=TestA:dlbytes, timestamp=1375436156140,
value=one two three                                             
>  mytestRowKey                          column=TestA:tbytes, timestamp=1375436156140,
value=one two three                                              
>  mytestRowKey                          column=TestA:ulbytes, timestamp=1375436156140,
value= three                                                    
> 1 row(s) in 0.0280 seconds
> {noformat}
> *My test code:*
> {code:title=Database.java|borderStyle=solid}
> import static org.junit.Assert.*;
> import java.io.IOException;
>  
> import org.apache.hadoop.conf.Configuration;
> import org.apache.hadoop.hbase.HBaseConfiguration;
> import org.apache.hadoop.hbase.HColumnDescriptor;
> import org.apache.hadoop.hbase.HTableDescriptor;
> import org.apache.hadoop.hbase.client.HBaseAdmin;
> import org.apache.hadoop.hbase.client.HTableInterface;
> import org.apache.hadoop.hbase.client.HTablePool;
> import org.apache.hadoop.hbase.client.Append;
> import org.apache.hadoop.hbase.client.Result;
> import org.apache.hadoop.hbase.util.Bytes;
> import org.junit.Test;
> ...
>     @Test
>     public void testAppend() throws IOException {
>         byte [] rowKey = Bytes.toBytes("mytestRowKey");
>         byte [] column1 = Bytes.toBytes("ulbytes");
>         byte [] column2 = Bytes.toBytes("dlbytes");
>         byte [] column3 = Bytes.toBytes("tbytes");
>         String part11 = "one two";
>         String part12 = " three";
>         String cFamily = "TestA";
>         String TABLE = "mytesttable";
>         Configuration conf = HBaseConfiguration.create();
>         HTablePool pool = new HTablePool(conf, 10);
>         HBaseAdmin admin = new HBaseAdmin(conf);
>         
>         if(admin.tableExists(TABLE)){
>             admin.disableTable(TABLE);
>             admin.deleteTable(TABLE);
>         }
>         
>         HTableDescriptor tableDescriptor = new HTableDescriptor(TABLE);
>         HColumnDescriptor hcd = new HColumnDescriptor(cFamily);
>         hcd.setMaxVersions(1);
>         tableDescriptor.addFamily(hcd);
>         admin.createTable(tableDescriptor);
>         HTableInterface table = pool.getTable(TABLE);
>         
>         Append a = new Append(rowKey);
>         a.setReturnResults(false);
>         a.add(Bytes.toBytes(cFamily), column1, Bytes.toBytes(part11));
>         a.add(Bytes.toBytes(cFamily), column2, Bytes.toBytes(part11));
>         a.add(Bytes.toBytes(cFamily), column3, Bytes.toBytes(part11));
>         table.append(a);
>         a = new Append(rowKey);
>         a.add(Bytes.toBytes(cFamily), column1, Bytes.toBytes(part12));
>         a.add(Bytes.toBytes(cFamily), column2, Bytes.toBytes(part12));
>         a.add(Bytes.toBytes(cFamily), column3, Bytes.toBytes(part12));
>         Result result = table.append(a);
>         byte [] resultForColumn1 = result.getValue(Bytes.toBytes(cFamily), column1);
>         byte [] resultForColumn2 = result.getValue(Bytes.toBytes(cFamily), column2);
>         byte [] resultForColumn3 = result.getValue(Bytes.toBytes(cFamily), column3);
>         if (resultForColumn1 == null || resultForColumn2 == null || resultForColumn3
== null)
>             System.out.println("The DB table contains these values but they are never
given back, strange...");
>         else {
>             assertEquals(0, Bytes.compareTo(Bytes.toBytes(part11 + part12),
>                     resultForColumn1));
>             assertEquals(0, Bytes.compareTo(Bytes.toBytes(part11 + part12),
>                     resultForColumn2));
>             assertEquals(0, Bytes.compareTo(Bytes.toBytes(part11 + part12),
>                     resultForColumn3));
>         }
>         HTable t = new HTable(conf, TABLE);   
>         Get getOperation = new Get(rowKey);
>         getOperation.addColumn(Bytes.toBytes(cFamily), column1);
>         Result res = t.get(getOperation);           
>         assertEquals(0, Bytes.compareTo(Bytes.toBytes(part11 + part12), res.getValue(Bytes.toBytes(cFamily),
column1)));
>       }
> {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

Mime
View raw message