@Test public void testCountOfCellsAfterFlatteningByScan() throws IOException { String[] keys1 = { "A", "B", "C" }; // A, B, C addRowsByKeysWith50Cols(memstore, keys1); // this should only flatten as there are no duplicates ((CompactingMemStore) memstore).flushInMemory(); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); } List<KeyValueScanner> scanners = memstore.getScanners(Long.MAX_VALUE); // seek int count = 0; for(int i = 0; i < scanners.size(); i++) { scanners.get(i).seek(KeyValue.LOWESTKEY); while (scanners.get(i).next() != null) { count++; } } assertEquals("the count should be ", 150, count); for(int i = 0; i < scanners.size(); i++) { scanners.get(i).close(); } }
for (int i = 0; i < keysList.size(); i++) { addRowsByKeys(memstore, keysList.get(i), val); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
((CompactingMemStore) ((HStore)region.getStore(FAMILY3)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore)region.getStore(FAMILY1)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
.flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY1)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); ((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY2)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY2)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); ((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY3)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY3)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (mem.isMemStoreFlushingInMemory()) { TimeUnit.SECONDS.sleep(1);
@Test public void testCountOfCellsAfterFlatteningByIterator() throws IOException { String[] keys1 = { "A", "B", "C" }; // A, B, C addRowsByKeysWith50Cols(memstore, keys1); // this should only flatten as there are no duplicates ((CompactingMemStore) memstore).flushInMemory(); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); } // Just doing the cnt operation here MemStoreSegmentsIterator itr = new MemStoreMergerSegmentsIterator( ((CompactingMemStore) memstore).getImmutableSegments().getStoreSegments(), CellComparatorImpl.COMPARATOR, 10); int cnt = 0; try { while (itr.next() != null) { cnt++; } } finally { itr.close(); } assertEquals("the count should be ", 150, cnt); }
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
.isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10);
.isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10);
mss = memstore.getFlushableSize(); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
@Test public void testCountOfCellsAfterFlatteningByScan() throws IOException { String[] keys1 = { "A", "B", "C" }; // A, B, C addRowsByKeysWith50Cols(memstore, keys1); // this should only flatten as there are no duplicates ((CompactingMemStore) memstore).flushInMemory(); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); } List<KeyValueScanner> scanners = memstore.getScanners(Long.MAX_VALUE); // seek int count = 0; for(int i = 0; i < scanners.size(); i++) { scanners.get(i).seek(KeyValue.LOWESTKEY); while (scanners.get(i).next() != null) { count++; } } assertEquals("the count should be ", 150, count); for(int i = 0; i < scanners.size(); i++) { scanners.get(i).close(); } }
((CompactingMemStore) ((HStore)region.getStore(FAMILY3)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore)region.getStore(FAMILY1)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); .isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);
.flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY1)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); ((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY2)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY2)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10); ((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY3)).memstore).flushInMemory(); while (((CompactingMemStore) ((HStore) stressedRegion.getStore(FAMILY3)).memstore) .isMemStoreFlushingInMemory()) { Threads.sleep(10);
while (mem.isMemStoreFlushingInMemory()) { TimeUnit.SECONDS.sleep(1);
@Test public void testCountOfCellsAfterFlatteningByIterator() throws IOException { String[] keys1 = { "A", "B", "C" }; // A, B, C addRowsByKeysWith50Cols(memstore, keys1); // this should only flatten as there are no duplicates ((CompactingMemStore) memstore).flushInMemory(); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); } // Just doing the cnt operation here MemStoreSegmentsIterator itr = new MemStoreMergerSegmentsIterator( ((CompactingMemStore) memstore).getImmutableSegments().getStoreSegments(), CellComparatorImpl.COMPARATOR, 10); int cnt = 0; try { while (itr.next() != null) { cnt++; } } finally { itr.close(); } assertEquals("the count should be ", 150, cnt); }
while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10); while (((CompactingMemStore) memstore).isMemStoreFlushingInMemory()) { Threads.sleep(10);