public SortedOplogConfiguration(String name, BlockCache blockCache, SortedOplogStatistics stats, HFileStoreStatistics storeStats) { this.name = name; this.stats = stats; // defaults bloom = true; blockSize = 1 << 16; bytesPerChecksum = 1 << 14; checksum = Checksum.NONE; compression = Compression.NONE; keyEncoding = KeyEncoding.NONE; comparator = new ByteComparator(); this.cacheDataBlocksOnRead = true; this.storeStats = storeStats; this.blockCache = blockCache; }
public IndexSerializedComparator() { primary = new LexicographicalComparator(); secondary = new ByteComparator(); }
@Override protected final void setUp() throws IOException { data = new TreeMap<>(new ByteComparator().toBytesComparator()); for (int i = 0; i < 100; i++) { data.put(wrapInt(i), wrapInt(i)); } reader = createReader(data); }
public HFileSortedOplogWriter(int keys) throws IOException { try { int hfileBlockSize = Integer.getInteger( HoplogConfig.HFILE_BLOCK_SIZE_CONF, (1 << 16)); Algorithm compress = Algorithm.valueOf(System.getProperty(HoplogConfig.COMPRESSION, HoplogConfig.COMPRESSION_DEFAULT)); ByteComparator bc = new ByteComparator(); HFileContext hcontext = new HFileContextBuilder() .withBlockSize(hfileBlockSize) .withCompression(compress) .build(); writer = HFile.getWriterFactory(conf, cacheConf) .withPath(fsProvider.getFS(), path) .withFileContext(hcontext) .withComparator(bc) .create(); bfw = BloomFilterFactory.createGeneralBloomAtWrite(conf, cacheConf, BloomType.ROW, keys, writer); logger.fine("Created hoplog writer with compression " + compress); } catch (IOException e) { logger.fine("IO Error while creating writer"); throw e; } }