hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gray (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HBASE-1557) incrementColumnValue edits are not persisted
Date Mon, 22 Jun 2009 17:28:07 GMT

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

Jonathan Gray updated HBASE-1557:
---------------------------------

    Attachment:     (was: HBASE-1557-v1.patch)

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


Mime
View raw message