Class HadoopSnappyCompressionOutputStream

    • Method Detail

      • getSnappyOutputStream

        public static OutputStream getSnappyOutputStream​(OutputStream out)
                                                  throws Exception
        Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.
        Parameters:
        the - buffer size for the codec to use (in bytes)
        out - the base output stream to wrap around
        Returns:
        a OutputStream that uses the Snappy codec
        Throws:
        Exception - if snappy is not available or an error occurs during reflection
      • getSnappyOutputStream

        public static OutputStream getSnappyOutputStream​(int bufferSize,
                                                         OutputStream out)
                                                  throws Exception
        Gets an OutputStream that uses the snappy codec and wraps the supplied base output stream.
        Parameters:
        the - buffer size for the codec to use (in bytes)
        out - the base output stream to wrap around
        Returns:
        a OutputStream that uses the Snappy codec
        Throws:
        Exception - if snappy is not available or an error occurs during reflection