You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2009/06/20 21:50:07 UTC

[jira] Commented: (HBASE-1557) incrementColumnValue edits are not persisted

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

Andrew Purtell commented on HBASE-1557:
---------------------------------------

Latest trunk does not seem to resolve:

doesnt look that the latest fixes the problem ... See the following trial. When I use the incrementColumnValue, the cell value with "timestamp=9223372036854775807" is there before the server is restarted but after the server is restarted, it is not there.

{noformat}
irfan@damascus:~/thirdparty/src/hbase/hbase-core-trunk$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.0-dev, r786695, Sat Jun 20 15:19:53 EDT 2009
hbase(main):001:0>
hbase(main):002:0* get 'test_transaction_impression', '8219_0_2009061216', { COLUMN => 'publisher_id:', VERSIONS => 100 }
09/06/20 15:24:18 INFO zookeeper.ZooKeeperWrapper: Quorum servers: localhost:2181
timestamp=9223372036854775807, value=\000\000\000\000\000\000\000\003                                       
timestamp=1245523808930, value=\000\000\000\000\000\000\000\001                                             
timestamp=1245523746893, value=\000\000\000\000\000\000\000\001                                             
3 row(s) in 0.0410 seconds

hbase(main):003:0> irfan@damascus:~/thirdparty/src/hbase/hbase-core-trunk$ stop-hbase.sh
stopping master....................................................
localhost: stopping zookeeper.

irfan@damascus:~/thirdparty/src/hbase/hbase-core-trunk$ start-hbase.sh
localhost: starting zookeeper, logging to /home/irfan/apps/hbase-latest/bin/../logs/hbase-irfan-zookeeper-damascus.out
starting master, logging to /home/irfan/apps/hbase-latest/bin/../logs/hbase-irfan-master-damascus.out
localhost: starting regionserver, logging to /home/irfan/apps/hbase-latest/bin/../logs/hbase-irfan-regionserver-damascus.out

irfan@damascus:~/thirdparty/src/hbase/hbase-core-trunk$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.0-dev, r786695, Sat Jun 20 15:19:53 EDT 2009
hbase(main):001:0>  get 'test_transaction_impression', '8219_0_2009061216', { COLUMN => 'publisher_id:', VERSIONS => 100 }
09/06/20 15:34:36 INFO zookeeper.ZooKeeperWrapper: Quorum servers: localhost:2181
timestamp=1245523808930, value=\000\000\000\000\000\000\000\001                                             
timestamp=1245523746893, value=\000\000\000\000\000\000\000\001                                             
2 row(s) in 0.0400 seconds
hbase(main):002:0>
{noformat}


> incrementColumnValue edits are not persisted
> --------------------------------------------
>
>                 Key: HBASE-1557
>                 URL: https://issues.apache.org/jira/browse/HBASE-1557
>             Project: Hadoop HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>             Fix For: 0.20.0, 0.19.4
>
>
> From Irfan up on hbase-users@
> I shutdown hbase using the following command
> {{$ HBASE_HOME/bin/stop-hbase.sh}}
> and it shuts down properly after a few seconds.
> here is my observation since last night. If I user TableRecordWriter1 uses HTable.incrementColumnValue, then the table data is not persisted across restarts but if I use TableRecordWriter2 then the table data is persisted across the restarts.
> Any clues ...
> Thanks,
> Irfan
> {code}
>     protected static class TableRecordWriter extends RecordWriter<ImmutableBytesWritable, Put> {
>         ...
>         ...
>         ...
>         /**
>         * {@inheritDoc}
>         */
>         @Override
>         public void write(ImmutableBytesWritable key, Put put) throws IOException
>         {
>             byte[] row = put.getRow();
>             for (Map.Entry<byte[], List<KeyValue>> familyEntry : put.getFamilyMap().entrySet()) {
>                 byte[] family = familyEntry.getKey();
>                 for (KeyValue keyValue : familyEntry.getValue()) {
>                     byte[] qualifier = keyValue.getQualifier();
>                     long amount = Bytes.toLong(keyValue.getValue());
>                     this.table_.incrementColumnValue(row, family, qualifier, amount);
>                 }
>             }
>         }
>     }
> {code}
> ------
> {code}
>     protected static class TableRecordWriter2 extends RecordWriter<ImmutableBytesWritable, Put> {
>         ...
>         ...
>         ...
>         /**
>         * {@inheritDoc}
>         */
>         public void write(ImmutableBytesWritable key, Put put) throws IOException {
>             this.table_.put(new Put(put));
>         }
>     }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.