hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Junqueira <...@yahoo-inc.com>
Subject Re: Question about WALEdit
Date Mon, 08 Oct 2012 21:34:25 GMT
Thanks, Ted. It detects it by writing and reading back the number of elements. Does it detect
if the last one has been partially written?

-Flavio

On Oct 8, 2012, at 11:10 PM, Ted Yu wrote:

> From javadoc:
> 
> * In the new world, all the edits for a given transaction are written
> * out as a single record, for example:
> *
> *   <logseq#-for-entire-txn>:<WALEdit-for-entire-txn>
> 
> The keyvalues for the three edits would be stored in one record.
> 
>  public void readFields(DataInput in) throws IOException {
> 
> If only two got written, the above method would throw IOException.
> 
> Cheers
> 
> On Mon, Oct 8, 2012 at 12:54 PM, Flavio Junqueira <fpj@yahoo-inc.com> wrote:
> 
>> I was wondering if there is any mechanism implemented to detect WALEdits
>> that haven't been entirely written to the wal. Say that a transaction
>> (using the terminology in the header of the WALEdit class) has three edits,
>> but only two get written to the wal. How do we detect that it is a corrupt
>> record when reading?
>> 
>> Thanks!
>> -Flavio


Mime
View raw message