|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.io.compress.CompressionCodecFactory
public class CompressionCodecFactory
A factory that will find the correct codec for a given filename.
| Field Summary | |
|---|---|
static org.apache.commons.logging.Log |
LOG
|
| Constructor Summary | |
|---|---|
CompressionCodecFactory(Configuration conf)
Find the codecs specified in the config value io.compression.codecs and register them. |
|
| Method Summary | |
|---|---|
CompressionCodec |
getCodec(Path file)
Find the relevant compression codec for the given file based on its filename suffix. |
static java.util.List<java.lang.Class<? extends CompressionCodec>> |
getCodecClasses(Configuration conf)
Get the list of codecs listed in the configuration |
static void |
main(java.lang.String[] args)
A little test program. |
static java.lang.String |
removeSuffix(java.lang.String filename,
java.lang.String suffix)
Removes a suffix from a filename, if it has it. |
static void |
setCodecClasses(Configuration conf,
java.util.List<java.lang.Class> classes)
Sets a list of codec classes in the configuration. |
java.lang.String |
toString()
Print the extension map out as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public CompressionCodecFactory(Configuration conf)
| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic static java.util.List<java.lang.Class<? extends CompressionCodec>> getCodecClasses(Configuration conf)
conf - the configuration to look in
public static void setCodecClasses(Configuration conf,
java.util.List<java.lang.Class> classes)
conf - the configuration to modifyclasses - the list of classes to setpublic CompressionCodec getCodec(Path file)
file - the filename to check
public static java.lang.String removeSuffix(java.lang.String filename,
java.lang.String suffix)
filename - the filename to stripsuffix - the suffix to remove
public static void main(java.lang.String[] args)
throws java.lang.Exception
args -
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||