public static void usage() { System.err.println( "Usage: CompressionTest <path> " + StringUtils.join( Compression.Algorithm.values(), "|").toLowerCase(Locale.ROOT) + "\n" + "For example:\n" + " hbase " + CompressionTest.class + " file:///tmp/testfile gz\n"); System.exit(1); }
/** * Deserialize the file trailer as writable data * @param input * @throws IOException */ void deserializeFromWritable(DataInput input) throws IOException { fileInfoOffset = input.readLong(); loadOnOpenDataOffset = input.readLong(); dataIndexCount = input.readInt(); uncompressedDataIndexSize = input.readLong(); metaIndexCount = input.readInt(); totalUncompressedBytes = input.readLong(); entryCount = input.readLong(); compressionCodec = Compression.Algorithm.values()[input.readInt()]; numDataIndexLevels = input.readInt(); firstDataBlockOffset = input.readLong(); lastDataBlockOffset = input.readLong(); // TODO this is a classname encoded into an HFile's trailer. We are going to need to have // some compat code here. setComparatorClass(getComparatorClass(Bytes.readStringFixedSize(input, MAX_COMPARATOR_NAME_LENGTH))); }
Algorithm[] possibleAlgos = Algorithm.values();
options.addOption(COMPRESSION_OPTION, "compression", true, " Compression type, one of " + Arrays.toString(Compression.Algorithm.values())); options.addOption(BLOOM_FILTER_OPTION, "bloom_filter", true, "Bloom filter type, one of "
setMaxVersions(in.readInt()); int ordinal = in.readInt(); setCompressionType(Compression.Algorithm.values()[ordinal]); setInMemory(in.readBoolean()); setBloomFilterType(in.readBoolean() ? BloomType.ROW : BloomType.NONE);
compressionCodec = Compression.Algorithm.values()[trailerProto.getCompressionCodec()]; } else { compressionCodec = Compression.Algorithm.NONE;
Algorithm[] possibleAlgos = Algorithm.values();
/** * Deserialize the file trailer as writable data * @param input * @throws IOException */ void deserializeFromWritable(DataInput input) throws IOException { fileInfoOffset = input.readLong(); loadOnOpenDataOffset = input.readLong(); dataIndexCount = input.readInt(); uncompressedDataIndexSize = input.readLong(); metaIndexCount = input.readInt(); totalUncompressedBytes = input.readLong(); entryCount = input.readLong(); compressionCodec = Compression.Algorithm.values()[input.readInt()]; numDataIndexLevels = input.readInt(); firstDataBlockOffset = input.readLong(); lastDataBlockOffset = input.readLong(); // TODO this is a classname encoded into an HFile's trailer. We are going to need to have // some compat code here. setComparatorClass(getComparatorClass(Bytes.readStringFixedSize(input, MAX_COMPARATOR_NAME_LENGTH))); }
public static void usage() { System.err.println( "Usage: CompressionTest <path> " + StringUtils.join( Compression.Algorithm.values(), "|").toLowerCase() + "\n" + "For example:\n" + " hbase " + CompressionTest.class + " file:///tmp/testfile gz\n"); System.exit(1); }
options.addOption(COMPRESSION_OPTION, "compression", true, " Compression type, one of " + Arrays.toString(Compression.Algorithm.values())); options.addOption(BLOOM_FILTER_OPTION, "bloom_filter", true, "Bloom filter type, one of "
compressionCodec = Compression.Algorithm.values()[trailerProto.getCompressionCodec()]; } else { compressionCodec = Compression.Algorithm.NONE;