hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Purtell <apurt...@apache.org>
Subject Re: table data is lost after the server is restarted
Date Sat, 20 Jun 2009 19:17:10 GMT
Thanks for the detailed bug report. I have filed a JIRA on your behalf.
Please see https://issues.apache.org/jira/browse/HBASE-1557

Thanks, 

   - Andy




________________________________
From: Irfan Mohammed <irfan.ma@gmail.com>
To: hbase-dev@hadoop.apache.org
Sent: Saturday, June 20, 2009 12:01:25 PM
Subject: Re: table data is lost after the server is restarted

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

    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);
                }
            }
        }
    }

.........................

    protected static class TableRecordWriter2 extends RecordWriter<ImmutableBytesWritable,
Put> {
        ...
        ...
        ...

        /**
         * {@inheritDoc}
         */
        public void write(ImmutableBytesWritable key, Put put) throws IOException {
            this.table_.put(new Put(put));
        }
    }

----- Original Message -----
From: "Andrew Purtell" <apurtell@apache.org>
To: hbase-dev@hadoop.apache.org
Sent: Saturday, June 20, 2009 1:09:14 PM GMT -05:00 US/Canada Eastern
Subject: Re: table data is lost after the server is restarted

Data is normally persisted across restarts, otherwise the people currently running HBase in
production would not. We can try to understand what about your particular usage is causing
trouble. How are you stopping the daemons? May we have a look at your Hadoop *-site.xml and
hbase-site.xml files?

Thanks,

   - Andy






________________________________
From: Irfan Mohammed <irfan.ma@gmail.com>
To: hbase-dev@hadoop.apache.org
Sent: Friday, June 19, 2009 9:04:36 PM
Subject: Re: table data is lost after the server is restarted

Thanks. 

What are my options to write the data to the disk and keep it around across restarts? 

Thank you.

----- Original Message -----
From: "Erik Holstad" <erikholstad@gmail.com>
To: hbase-dev@hadoop.apache.org
Sent: Friday, June 19, 2009 11:54:05 PM GMT -05:00 US/Canada Eastern
Subject: Re: table data is lost after the server is restarted

Hey Irfan!
Have a look at the thread name table contents disappeared in the HBase-users
list.
You might have the same problem.

Regards Erik


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message