public SortedOplogConfiguration(String name) { this(name, null, new SortedOplogStatistics("GridDBRegionStatistics", name), new HFileStoreStatistics("GridDBStoreStatistics", name)); }
/** * @param listener * listener of change events like file creation and deletion * @param hdfsRegionDirector */ HdfsRegionManager(LocalRegion region, HDFSStoreImpl store, HoplogListener listener, StatisticsFactory statsFactory, HDFSRegionDirector hdfsRegionDirector) { bucketOrganizerMap = new ConcurrentHashMap<Integer, HoplogOrganizer>(); this.region = region; this.listener = listener; this.store = store; this.hdfsStats = new SortedOplogStatistics(statsFactory, "HDFSRegionStatistics", region.getFullPath()); this.hdfsRegionDirector = hdfsRegionDirector; }
/** * @param listener * listener of change events like file creation and deletion * @param hdfsRegionDirector */ HdfsRegionManager(LocalRegion region, HDFSStoreImpl store, HoplogListener listener, StatisticsFactory statsFactory, HDFSRegionDirector hdfsRegionDirector) { bucketOrganizerMap = new ConcurrentHashMap<Integer, HoplogOrganizer>(); this.region = region; this.listener = listener; this.store = store; this.hdfsStats = new SortedOplogStatistics(statsFactory, "HDFSRegionStatistics", region.getFullPath()); this.hdfsRegionDirector = hdfsRegionDirector; }
protected SortedOplogSetImpl createSoplogSet(String name) throws IOException { SortedOplogFactory factory = new HFileSortedOplogFactory(name, null, new SortedOplogStatistics("stats", name), new HFileStoreStatistics("storeStats", name)); Compactor compactor = new NonCompactor(name, new File(".")); return new SortedOplogSetImpl(factory, Executors.newSingleThreadExecutor(), compactor); }
public void setUp() throws IOException { factory = new HFileSortedOplogFactory("test", null, new SortedOplogStatistics("stats", "test"), new HFileStoreStatistics("storeStats", "test")); compactor = createCompactor(factory); }
@Override protected SortedOplogSetImpl createSoplogSet(String name) throws IOException { SortedOplogFactory factory = new HFileSortedOplogFactory(name, null, new SortedOplogStatistics("stats", name), new HFileStoreStatistics("storeStats", name)); Compactor compactor = createCompactor(factory); return new SortedOplogSetImpl(factory, Executors.newSingleThreadExecutor(), compactor); }
public HFileSortedIterator(HFileScanner scan, byte[] from, boolean fromInclusive, byte[] to, boolean toInclusive) throws IOException { this.scan = scan; this.from = from; this.fromInclusive = fromInclusive; this.to = to; this.toInclusive = toInclusive; scanStat = (stats == null) ? new SortedOplogStatistics("", "").new ScanOperation( 0, 0, 0, 0, 0, 0, 0) : stats.getScan(); scanStart = scanStat.begin(); if (scan == null) { return; } assert from == null || to == null || scan.getReader().getComparator().compare(from, to) <= 0; initIterator(); }
public HFileSortedIterator(HFileScanner scan, byte[] from, boolean fromInclusive, byte[] to, boolean toInclusive) throws IOException { this.scan = scan; this.from = from; this.fromInclusive = fromInclusive; this.to = to; this.toInclusive = toInclusive; scanStat = (stats == null) ? new SortedOplogStatistics("", "").new ScanOperation( 0, 0, 0, 0, 0, 0, 0) : stats.getScan(); scanStart = scanStat.begin(); if (scan == null) { return; } assert from == null || to == null || scan.getReader().getComparator().compare( from, 0, from.length, to, 0, to.length) <= 0; initIterator(); }
public void testTombstone() throws Exception { FlushCounter handler = new FlushCounter(); SortedOplogFactory factory = new HFileSortedOplogFactory("tombstone", null, new SortedOplogStatistics("stats", "tombstone"), new HFileStoreStatistics("storeStats", "tombstone")); Compactor compactor = new SizeTieredCompactor(factory, NonCompactor.createFileset("tombstone", new File(".")), new FileTracker(), Executors.newSingleThreadExecutor(), 2, 2); SortedOplogSet sos = new SortedOplogSetImpl(factory, Executors.newSingleThreadExecutor(), compactor); for (int i = 0; i < 1000; i++) { sos.put(wrapInt(i), wrapInt(i)); } sos.flush(null, handler); for (int i = 900; i < 1000; i++) { sos.put(wrapInt(i), new byte[] {SoplogToken.TOMBSTONE.toByte()}); } flushAndWait(handler, sos); compactAndWait(sos, true); validate(sos, 900); sos.close(); }