/** * Utility method broken out of internalPrepareFlushCache so that method is smaller. */ private void logFatLineOnFlush(Collection<HStore> storesToFlush, long sequenceId) { if (!LOG.isInfoEnabled()) { return; } // Log a fat line detailing what is being flushed. StringBuilder perCfExtras = null; if (!isAllFamilies(storesToFlush)) { perCfExtras = new StringBuilder(); for (HStore store: storesToFlush) { MemStoreSize mss = store.getFlushableSize(); perCfExtras.append("; ").append(store.getColumnFamilyName()); perCfExtras.append("={dataSize=") .append(StringUtils.byteDesc(mss.getDataSize())); perCfExtras.append(", heapSize=") .append(StringUtils.byteDesc(mss.getHeapSize())); perCfExtras.append(", offHeapSize=") .append(StringUtils.byteDesc(mss.getOffHeapSize())); perCfExtras.append("}"); } } MemStoreSize mss = this.memStoreSizing.getMemStoreSize(); LOG.info("Flushing " + + storesToFlush.size() + "/" + stores.size() + " column families," + " dataSize=" + StringUtils.byteDesc(mss.getDataSize()) + " heapSize=" + StringUtils.byteDesc(mss.getHeapSize()) + ((perCfExtras != null && perCfExtras.length() > 0)? perCfExtras.toString(): "") + ((wal != null) ? "" : "; WAL is null, using passed sequenceid=" + sequenceId)); }
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; }
store.getColumnFamilyDescriptor().getName()); if (ctx != null) { MemStoreSize mss = store.getFlushableSize(); ctx.abort(); this.decrMemStoreSize(mss);
MemStoreSize mss = store.getFlushableSize(); if (!(abort || mss.getDataSize() == 0 || writestate.readOnly)) { if (getRegionServerServices() != null) {
expectedSize, region.getMemStoreDataSize()); assertEquals("flushable size should be incremented", expectedSize, store.getFlushableSize().getDataSize());
assertTrue("The regionserver should have thrown an exception", threwIOE); MemStoreSize mss = store.getFlushableSize(); assertTrue("flushable size should be zero, but it is " + mss, mss.getDataSize() == 0);
null : this.prepareFlushResult.storeFlushCtxs.get(family); if (ctx != null) { MemStoreSize mss = store.getFlushableSize(); ctx.abort(); this.decrMemStoreSize(mss);
MemStoreSize mss = store.getFlushableSize(); assertTrue(mss.getHeapSize() == MutableSegment.DEEP_OVERHEAD);
MemStoreSize mss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > 0); // assert that the memstore is not dropped
long storeMemstoreSize = store.getMemStoreSize().getHeapSize(); long regionMemstoreSize = secondaryRegion.getMemStoreDataSize(); MemStoreSize mss = store.getFlushableSize(); long storeSize = store.getSize(); long storeSizeUncompressed = store.getStoreSizeUncompressed(); assertEquals(expectedStoreFileCount, s.getStorefilesCount()); MemStoreSize newMss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > newMss.getHeapSize());
MemStoreSize mss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > 0); // assert that the memstore is not dropped
MemStoreSize mss = store.getFlushableSize(); if (droppableMemstore) {
long storeMemstoreSize = store.getMemStoreSize().getHeapSize(); long regionMemstoreSize = secondaryRegion.getMemStoreDataSize(); MemStoreSize mss = store.getFlushableSize();
expectedSize, region.getMemStoreDataSize()); assertEquals("flushable size should be incremented", expectedSize, store.getFlushableSize().getDataSize());
assertTrue("The regionserver should have thrown an exception", threwIOE); MemStoreSize mss = store.getFlushableSize(); assertTrue("flushable size should be zero, but it is " + mss, mss.getDataSize() == 0);
MemStoreSize mss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > 0); // assert that the memstore is not dropped
long storeMemstoreSize = store.getMemStoreSize().getHeapSize(); long regionMemstoreSize = secondaryRegion.getMemStoreDataSize(); MemStoreSize mss = store.getFlushableSize(); long storeSize = store.getSize(); long storeSizeUncompressed = store.getStoreSizeUncompressed(); assertEquals(expectedStoreFileCount, s.getStorefilesCount()); MemStoreSize newMss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > newMss.getHeapSize());
MemStoreSize mss = store.getFlushableSize(); assertTrue(mss.getHeapSize() > 0); // assert that the memstore is not dropped
MemStoreSize mss = store.getFlushableSize(); if (droppableMemstore) {
long storeMemstoreSize = store.getMemStoreSize().getHeapSize(); long regionMemstoreSize = secondaryRegion.getMemStoreDataSize(); MemStoreSize mss = store.getFlushableSize();