> On Sept. 13, 2012, 7 p.m., Brock Noland wrote:
> > flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/EventQueueBackingStoreFile.java,
> >  line 105
> > <https://reviews.apache.org/r/7086/diff/1/?file=154337#file154337line105>
> >
> >     I don't see the sync() call? Why not keep the call to elementsBuffer 
> > and then use it's force() method?
> 
> Hari Shreedharan wrote:
>     Note that checkpointFileHandle is a RandomAccessFile. RandomAccessFile 
> does not need a sync call, does it?  The write call will only write the 8 
> bytes - while I could not find documentation which explains what a 
> byteBuffer.force() forces.

With a RAF you either have to call getFD().sync() 
http://docs.oracle.com/javase/6/docs/api/java/io/FileDescriptor.html#sync()  or 
getChannel().force()  
http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html#force(boolean)
  to tell the OS to sync the pages to disk.

It as the same affect as 
http://docs.oracle.com/javase/1.4.2/docs/api/java/nio/MappedByteBuffer.html#force()


- Brock


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7086/#review11490
-----------------------------------------------------------


On Sept. 13, 2012, 6:54 p.m., Hari Shreedharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7086/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2012, 6:54 p.m.)
> 
> 
> Review request for Flume.
> 
> 
> Description
> -------
> 
> CHECKPOINT_INCOMPLETE will now be written synchronously to disk before 
> starting checkpoint.
> 
> 
> This addresses bug FLUME-1576.
>     https://issues.apache.org/jira/browse/FLUME-1576
> 
> 
> Diffs
> -----
> 
>   
> flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/EventQueueBackingStoreFile.java
>  4717055 
> 
> Diff: https://reviews.apache.org/r/7086/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Hari Shreedharan
> 
>

Reply via email to