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:16: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: HBASE-1557-v1.patch

I'm not sure what exactly this issue is about.  My testing shows increment is okay as long
as you flush.

However, currently the hlog is not touched so under failure scenarios you will lose any increments
that have not yet been flushed.

This patch adds a writeToWAL argument and appends to the edit log on every increment, however
the boolean is not exposed to the client in this patch and is default true.  Wanted to discuss
with other before going further.

Thoughts?

> 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
>
>         Attachments: HBASE-1557-v1.patch
>
>
> 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