Class Compressor
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.Compressor
A set of static functions for running our custom WAL compression/decompression. Also contains a
 command line tool to compress and uncompress WALs.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidCommand line tool to compress and uncompress WALs.private static void(package private) static byte[]readCompressed(DataInput in, Dictionary dict) Deprecated.(package private) static shorttoShort(byte hi, byte lo) private static voidtransformFile(org.apache.hadoop.fs.Path input, org.apache.hadoop.fs.Path output) (package private) static intuncompressIntoArray(byte[] to, int offset, DataInput in, Dictionary dict) Deprecated.(package private) static voidwriteCompressed(byte[] data, int offset, int length, DataOutput out, Dictionary dict) Deprecated.
- 
Constructor Details- 
Compressorpublic Compressor()
 
- 
- 
Method Details- 
mainCommand line tool to compress and uncompress WALs.- Throws:
- IOException
 
- 
printHelp
- 
transformFileprivate static void transformFile(org.apache.hadoop.fs.Path input, org.apache.hadoop.fs.Path output) throws IOException - Throws:
- IOException
 
- 
readCompressedDeprecated.Reads the next compressed entry and returns it as a byte array- Parameters:
- in- the DataInput to read from
- dict- the dictionary we use for our read.
- Returns:
- the uncompressed array.
- Throws:
- IOException
 
- 
uncompressIntoArray@Deprecated static int uncompressIntoArray(byte[] to, int offset, DataInput in, Dictionary dict) throws IOException Deprecated.Reads a compressed entry into an array. The output into the array ends up length-prefixed.- Parameters:
- to- the array to write into
- offset- array offset to start writing to
- in- the DataInput to read from
- dict- the dictionary to use for compression
- Returns:
- the length of the uncompressed data
- Throws:
- IOException
 
- 
writeCompressed@Deprecated static void writeCompressed(byte[] data, int offset, int length, DataOutput out, Dictionary dict) throws IOException Deprecated.Compresses and writes an array to a DataOutput- Parameters:
- data- the array to write.
- out- the DataOutput to write into
- dict- the dictionary to use for compression
- Throws:
- IOException
 
- 
toShort
 
-