org.apache.flume.channel.file
Class Serialization
java.lang.Object
org.apache.flume.channel.file.Serialization
@InterfaceAudience.Private
@InterfaceStability.Unstable
public class Serialization
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
METADATA_FILENAME
public static final String METADATA_FILENAME
- See Also:
- Constant Field Values
METADATA_TMP_FILENAME
public static final String METADATA_TMP_FILENAME
- See Also:
- Constant Field Values
OLD_METADATA_FILENAME
public static final String OLD_METADATA_FILENAME
- See Also:
- Constant Field Values
LOG
public static final org.slf4j.Logger LOG
copyFile
public static boolean copyFile(File from,
File to)
throws IOException
- Copy a file using a 64K size buffer. This method will copy the file and
then fsync to disk
- Parameters:
from
- File to copy - this file should existto
- Destination file - this file should not exist
- Returns:
- true if the copy was successful
- Throws:
IOException
compressFile
public static boolean compressFile(File uncompressed,
File compressed)
throws IOException
- Compress file using Snappy
- Parameters:
uncompressed
- File to compress - this file should existcompressed
- Compressed file - this file should not exist
- Returns:
- true if compression was successful
- Throws:
IOException
decompressFile
public static boolean decompressFile(File compressed,
File decompressed)
throws IOException
- Decompress file using Snappy
- Parameters:
compressed
- File to compress - this file should existdecompressed
- Compressed file - this file should not exist
- Returns:
- true if decompression was successful
- Throws:
IOException
Copyright © 2009-2015 Apache Software Foundation. All Rights Reserved.