org.apache.flume.channel.file
Class LogFileV3
java.lang.Object
org.apache.flume.channel.file.LogFile
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).
Field Summary |
protected static org.slf4j.Logger |
LOGGER
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER
protected static final org.slf4j.Logger LOGGER
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 filefile
- 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-2015 Apache Software Foundation. All Rights Reserved.