public class HadoopSnappyCompressionProvider extends Object implements CompressionProvider
Modifier and Type | Field and Description |
---|---|
static int |
IO_COMPRESSION_CODEC_SNAPPY_DEFAULT_BUFFERSIZE |
Constructor and Description |
---|
HadoopSnappyCompressionProvider() |
Modifier and Type | Method and Description |
---|---|
HadoopSnappyCompressionInputStream |
createInputStream(InputStream in)
Creates an input stream that decompresses data (according to the provider's implementation)
|
HadoopSnappyCompressionOutputStream |
createOutputStream(OutputStream out)
Creates an output stream that compresses data (according to the provider's implementation)
|
static Object |
getActiveSnappyShim()
Locate the Snappy Shim for the active Hadoop Configuration via the Hadoop Configuration Util
|
String |
getDefaultExtension()
Gets the default file extension for this provider.
|
String |
getDescription()
Gets the name of this provider.
|
String |
getName()
Gets the name of this provider.
|
static boolean |
isHadoopSnappyAvailable()
Tests whether hadoop-snappy (not to be confused with other java-based snappy implementations such as jsnappy or
snappy-java) plus the native snappy libraries are available.
|
boolean |
supportsInput()
Whether this compression provider supports input streams
|
boolean |
supportsOutput()
Whether this compression provider supports output streams
|
public static final int IO_COMPRESSION_CODEC_SNAPPY_DEFAULT_BUFFERSIZE
public static Object getActiveSnappyShim() throws Exception
org.pentaho.hadoop.shim.spi.SnappyShim
to interact with SnappyException
- Error locating a valid Snappy shim:
org.pentaho.hadoop.hive.jdbc.HadoopConfigurationUtil
could not be locatedpublic static boolean isHadoopSnappyAvailable()
public HadoopSnappyCompressionInputStream createInputStream(InputStream in) throws IOException
CompressionProvider
createInputStream
in interface CompressionProvider
in
- An existing input stream to wrapIOException
public boolean supportsInput()
CompressionProvider
supportsInput
in interface CompressionProvider
public HadoopSnappyCompressionOutputStream createOutputStream(OutputStream out) throws IOException
CompressionProvider
createOutputStream
in interface CompressionProvider
out
- An existing output stream to wrapIOException
public boolean supportsOutput()
CompressionProvider
supportsOutput
in interface CompressionProvider
public String getDescription()
CompressionProvider
getDescription
in interface CompressionProvider
public String getName()
CompressionProvider
getName
in interface CompressionProvider
public String getDefaultExtension()
CompressionProvider
getDefaultExtension
in interface CompressionProvider
Copyright © 2018 Hitachi Vantara. All rights reserved.