org.apache.hadoop.hbase.io.compress
Enum Compression.Algorithm

java.lang.Object
  extended by java.lang.Enum<Compression.Algorithm>
      extended by org.apache.hadoop.hbase.io.compress.Compression.Algorithm
All Implemented Interfaces:
Serializable, Comparable<Compression.Algorithm>
Enclosing class:
Compression

@InterfaceAudience.Public
@InterfaceStability.Evolving
public static enum Compression.Algorithm
extends Enum<Compression.Algorithm>

Compression algorithms. The ordinal of these cannot change or else you risk breaking all existing HFiles out there. Even the ones that are not compressed! (They use the NONE algorithm)


Enum Constant Summary
GZ
           
LZ4
           
LZO
           
NONE
           
SNAPPY
           
 
Method Summary
 OutputStream createCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor, int downStreamBufferSize)
           
 InputStream createDecompressionStream(InputStream downStream, org.apache.hadoop.io.compress.Decompressor decompressor, int downStreamBufferSize)
           
 org.apache.hadoop.io.compress.CompressionOutputStream createPlainCompressionStream(OutputStream downStream, org.apache.hadoop.io.compress.Compressor compressor)
          Creates a compression stream without any additional wrapping into buffering streams.
 org.apache.hadoop.io.compress.Compressor getCompressor()
           
 org.apache.hadoop.io.compress.Decompressor getDecompressor()
           
 String getName()
           
 void returnCompressor(org.apache.hadoop.io.compress.Compressor compressor)
           
 void returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor)
           
static Compression.Algorithm valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Compression.Algorithm[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LZO

public static final Compression.Algorithm LZO

GZ

public static final Compression.Algorithm GZ

NONE

public static final Compression.Algorithm NONE

SNAPPY

public static final Compression.Algorithm SNAPPY

LZ4

public static final Compression.Algorithm LZ4
Method Detail

values

public static Compression.Algorithm[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Compression.Algorithm c : Compression.Algorithm.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Compression.Algorithm valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

createDecompressionStream

public InputStream createDecompressionStream(InputStream downStream,
                                             org.apache.hadoop.io.compress.Decompressor decompressor,
                                             int downStreamBufferSize)
                                      throws IOException
Throws:
IOException

createCompressionStream

public OutputStream createCompressionStream(OutputStream downStream,
                                            org.apache.hadoop.io.compress.Compressor compressor,
                                            int downStreamBufferSize)
                                     throws IOException
Throws:
IOException

createPlainCompressionStream

public org.apache.hadoop.io.compress.CompressionOutputStream createPlainCompressionStream(OutputStream downStream,
                                                                                          org.apache.hadoop.io.compress.Compressor compressor)
                                                                                   throws IOException
Creates a compression stream without any additional wrapping into buffering streams.

Throws:
IOException

getCompressor

public org.apache.hadoop.io.compress.Compressor getCompressor()

returnCompressor

public void returnCompressor(org.apache.hadoop.io.compress.Compressor compressor)

getDecompressor

public org.apache.hadoop.io.compress.Decompressor getDecompressor()

returnDecompressor

public void returnDecompressor(org.apache.hadoop.io.compress.Decompressor decompressor)

getName

public String getName()


Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.