hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: While performing append operations, on region split, some of the data is lost
Date Fri, 02 Jan 2015 19:12:20 GMT
Can you pastebin log from the region server which hosted the parent region
around the time of split ?

Thanks

On Fri, Jan 2, 2015 at 11:07 AM, Arul Ramachandran <arkuppai@gmail.com>
wrote:

> Hello folks,
>
> Hbase 0.96.1.2.0.6.1
>
> We see the following behavior.
>
> With append operation, data gets appended as expected until existing
> regions are getting populated. But as soon as hbase does a split on one of
> the region as it gets to its capacity, some of the append operations which
> are already submitted to hbase get impacted. Due to this some of the data
> is lost evident after running get operation on appended rows. We don't see
> appended data.
>
> Is this a bug or feature? Any comments/suggestions for work around?
>
> code snippet:
> Code:
> List<Row> recordsToProcess = new ArrayList<Row>();
> --- Loop through below code to generate multiple Append operations:
> Append appendRow = new Append(Bytes.toBytes("rowKey");
> appendRow.setReturnResults(false);
> for (String columnFamily : hBaseRow.getColumnValues().keySet()){
> for(Entry<String, String> column :
> hBaseRow.getColumnFamily(columnFamily).entrySet()){
> byte[] columnFamilyName = Bytes.toBytes(columnFamily);
> byte[] columnName = Bytes.toBytes(column.getKey());
> byte[] columnValue = Bytes.toBytes(column.getValue());
> appendRow.add(columnFamilyName, columnName, columnValue);
> }
> }
> recordsToProcess.add(appendRow);
>
> Object[] results = new Object[recordsToProcess.size()];
> HTableInterface hTable = getHTable();
> hTable.batch(recordsToProcess, results);
>
>
>
> Regards,
> Arul
>

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