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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static org.slf4j.Logger` | `LOG`
    `static String` | `METADATA_FILENAME`
    `static String` | `METADATA_TMP_FILENAME`
    `static String` | `OLD_METADATA_FILENAME`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `compressFile(File uncompressed, File compressed)` Compress file using Snappy
    `static boolean` | `copyFile(File from, File to)` Copy a file using a 64K size buffer.
    `static boolean` | `decompressFile(File compressed, File decompressed)` Decompress file using Snappy

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### 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

  - ### Method Detail

    - #### 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 exist
        `to` - 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 exist
        `compressed` - 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 exist
        `decompressed` - Compressed file - this file should not exist
      Returns:
        true if decompression was successful
      Throws:
        `IOException`

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