/** * Flushes the memstore anyway. * * @throws IOException */ public void flushMemStore() throws IOException { MemStoreSnapshot snapshot = memstore.snapshot(); internalFlushCache(snapshot); memstore.clearSnapshot(snapshot.getId()); }
/** * Adds a Cell into the memstore. * * @param cell The Cell to be added. * @throws IOException */ public void addToMemstore(Cell cell) throws IOException { memstore.add(cell); // flush the memstore if it's full. flushMemStoreIfNecessary(); }
/** * Flushes the memstore if the size is large enough. * * @throws IOException */ private void flushMemStoreIfNecessary() throws IOException { if (memstore.heapSize() >= flushSize) { flushMemStore(); } }