hadoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: SequenceFile syncFs behavior?
Date Fri, 02 Nov 2012 01:59:17 GMT
Hi Thanh Do,

SequenceFile.Writer.syncFs() in 2.x and 2.x-based releases, is
deprecated in favor of hsync() and hflush() new methods but internally
calls hflush itself, so its behavior is the same with regards to
durability as it was before (new metadata entries are created and the
buffer is flushed).

HBase has mechanisms to detect the right method to call (via
reflection) - see the SequenceFileLogWriter#getHFlush(…) method for
example.

On Thu, Nov 1, 2012 at 11:09 PM, Thanh Do <thanhdo@cs.wisc.edu> wrote:
> Hi all,
>
> Could somebody clarify me the behavior of SequenceFile.syncFs(). From the
> source, I saw this function is deprecated, and hsync() or hflush() is
> recommended? However, it seems like current stable release of HBase (0.94)
> or the cloudera distribution (4.0) uses syncFs for its HLog file.
>
> Would syncFs() guarantee data durability?
>
> I am using hadoop 2.0.
>
> Many thanks,
> Thanh Do
>



-- 
Harsh J

Mime
View raw message