private static void flushStore(HStore store, long id) throws IOException { StoreFlushContext storeFlushCtx = store.createFlushContext(id, FlushLifeCycleTracker.DUMMY); storeFlushCtx.prepare(); storeFlushCtx.flushCache(Mockito.mock(MonitoredTask.class)); storeFlushCtx.commit(Mockito.mock(MonitoredTask.class)); }
private MemStoreSize doDropStoreMemStoreContentsForSeqId(HStore s, long currentSeqId) throws IOException { MemStoreSize flushableSize = s.getFlushableSize(); this.decrMemStoreSize(flushableSize); StoreFlushContext ctx = s.createFlushContext(currentSeqId, FlushLifeCycleTracker.DUMMY); ctx.prepare(); ctx.abort(); return flushableSize; }
flush.flushCache(status); boolean needsCompaction = flush.commit(status); if (needsCompaction) { compactionRequested = true; List<Path> storeCommittedFiles = flush.getCommittedFiles(); committedFiles.put(storeName, storeCommittedFiles); prepareResult.totalFlushableSize.decMemStoreSize(storeFlushableSize); flushedOutputFileSize += flush.getOutputFileSize();
flush.flushCache(status); boolean needsCompaction = flush.commit(status); if (needsCompaction) { compactionRequested = true; List<Path> storeCommittedFiles = flush.getCommittedFiles(); committedFiles.put(storeName, storeCommittedFiles);
StoreFlushContext storeFlushCtx = store.createFlushContext(12345, FlushLifeCycleTracker.DUMMY); storeFlushCtx.prepare();
if (ctx != null) { MemStoreSize mss = store.getFlushableSize(); ctx.abort(); this.decrMemStoreSize(mss); this.prepareFlushResult.storeFlushCtxs.
ctx.replayFlush(flushFiles, dropMemstoreSnapshot); // replay the flush
MemStoreSize snapshotSize = flush.prepare(); totalSizeOfFlushableStores.incMemStoreSize(snapshotSize); storeFlushableSize.put(name, snapshotSize);
if (ctx != null) { MemStoreSize mss = store.getFlushableSize(); ctx.abort(); this.decrMemStoreSize(mss); this.prepareFlushResult.storeFlushCtxs.remove(family);
ctx.replayFlush(flushFiles, dropMemstoreSnapshot); // replay the flush
/** * Flush the memstore * @param store * @param id * @throws IOException */ private static void flushStore(HMobStore store, long id) throws IOException { StoreFlushContext storeFlushCtx = store.createFlushContext(id, FlushLifeCycleTracker.DUMMY); storeFlushCtx.prepare(); storeFlushCtx.flushCache(Mockito.mock(MonitoredTask.class)); storeFlushCtx.commit(Mockito.mock(MonitoredTask.class)); }
storeFlushCtx.prepare();
if (ctx != null) { long snapshotSize = store.getFlushableSize(); ctx.abort(); this.addAndGetGlobalMemstoreSize(-snapshotSize); this.prepareFlushResult.storeFlushCtxs.remove(store.getFamily().getName());
storeFlushCtx.prepare(); inputCellsAfterSnapshot.forEach(c -> store.add(c, null)); int numberOfMemScannersBeforeFlush = inputCellsAfterSnapshot.isEmpty() ? 1 : 2; storeFlushCtx.flushCache(Mockito.mock(MonitoredTask.class)); storeFlushCtx.commit(Mockito.mock(MonitoredTask.class));
StoreFlushContext storeFlushCtx = store.createFlushContext(12345, FlushLifeCycleTracker.DUMMY); storeFlushCtx.prepare();
if (ctx != null) { long snapshotSize = store.getFlushableSize(); ctx.abort(); this.addAndGetGlobalMemstoreSize(-snapshotSize); this.prepareFlushResult.storeFlushCtxs.remove(family);
storeFlushCtx.prepare(); }; ExecutorService service = Executors.newSingleThreadExecutor(); storeFlushCtx.flushCache(Mockito.mock(MonitoredTask.class)); storeFlushCtx.commit(Mockito.mock(MonitoredTask.class));
assertEquals(1, MyCompactingMemStoreWithCustomCompactor.RUNNER_COUNT.get()); StoreFlushContext storeFlushCtx = store.createFlushContext(id++, FlushLifeCycleTracker.DUMMY); storeFlushCtx.prepare(); conf.set(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, String.valueOf(TableDescriptorBuilder.DEFAULT_MEMSTORE_FLUSH_SIZE)); storeFlushCtx.flushCache(Mockito.mock(MonitoredTask.class)); storeFlushCtx.commit(Mockito.mock(MonitoredTask.class));