org.apache.flume.channel.file
Class LogFileV3

java.lang.Object
  extended by org.apache.flume.channel.file.LogFile
      extended by org.apache.flume.channel.file.LogFileV3

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class LogFileV3
extends LogFile

Represents a single data file on disk. Has methods to write, read sequentially (replay), and read randomly (channel takes).


Nested Class Summary
static class LogFileV3.SequentialReader
           
 
Nested classes/interfaces inherited from class org.apache.flume.channel.file.LogFile
LogFile.OperationRecordUpdater
 
Field Summary
protected static org.slf4j.Logger LOGGER
           
 
Fields inherited from class org.apache.flume.channel.file.LogFile
OP_EOF, OP_NOOP, OP_RECORD
 
Method Summary
static void writeDelimitedTo(com.google.protobuf.GeneratedMessage msg, File file)
          Writes a GeneratedMessage to a temp file, synchronizes it to disk and then renames the file over file.
 
Methods inherited from class org.apache.flume.channel.file.LogFile
main, readDelimitedBuffer, skipRecord, writeDelimitedBuffer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER

protected static final org.slf4j.Logger LOGGER
Method Detail

writeDelimitedTo

public static void writeDelimitedTo(com.google.protobuf.GeneratedMessage msg,
                                    File file)
                             throws IOException
Writes a GeneratedMessage to a temp file, synchronizes it to disk and then renames the file over file.

Parameters:
msg - GeneratedMessage to write to the file
file - destination file
Throws:
IOException - if a write error occurs or the File.renameTo method returns false meaning the file could not be overwritten.


Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.