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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Command line tool to compress and uncompress WALs.private static void
(package private) static byte[]
readCompressed
(DataInput in, Dictionary dict) Deprecated.(package private) static short
toShort
(byte hi, byte lo) private static void
transformFile
(org.apache.hadoop.fs.Path input, org.apache.hadoop.fs.Path output) (package private) static int
uncompressIntoArray
(byte[] to, int offset, DataInput in, Dictionary dict) Deprecated.(package private) static void
writeCompressed
(byte[] data, int offset, int length, DataOutput out, Dictionary dict) Deprecated.
-
Constructor Details
-
Compressor
public Compressor()
-
-
Method Details
-
main
Command line tool to compress and uncompress WALs.- Throws:
IOException
-
printHelp
-
transformFile
private static void transformFile(org.apache.hadoop.fs.Path input, org.apache.hadoop.fs.Path output) throws IOException - Throws:
IOException
-
readCompressed
Deprecated.Reads the next compressed entry and returns it as a byte array- Parameters:
in
- the DataInput to read fromdict
- 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 intooffset
- array offset to start writing toin
- the DataInput to read fromdict
- 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 intodict
- the dictionary to use for compression- Throws:
IOException
-
toShort
-