public void finish(Map<byte[], List<Cell>> familyMaps) { if (!isEnable()) { return; } for (Map.Entry<byte[], List<Cell>> e : familyMaps.entrySet()) { Store store = this.region.getStore(e.getKey()); if (store == null || e.getValue() == null) { continue; } if (e.getValue().size() > this.parallelPutToStoreThreadLimitCheckMinColumnCount) { AtomicInteger counter = preparePutToStoreMap.get(e.getKey()); // preparePutToStoreMap will be cleared when changing the configuration, so it may turn // into a negative value. It will be not accuracy in a short time, it's a trade-off for // performance. if (counter != null && counter.decrementAndGet() < 0) { counter.incrementAndGet(); } } } }
for (HStoreFile sf : (Collection<HStoreFile>)region.getStore(familyNameBytes).getStorefiles()) { synchronized (sf) { if (count < refSFCount) { assertEquals(1, region.getStoreFileList(new byte[][]{familyNameBytes}).size()); assertEquals(refSFCount+1, ((HStore)region.getStore(familyNameBytes)).getStoreEngine().getStoreFileManager() .getCompactedfiles().size()); assertEquals(1, region.getStoreFileList(new byte[][]{familyNameBytes}).size()); assertEquals(0, ((HStore)region.getStore(familyNameBytes)).getStoreEngine().getStoreFileManager() .getCompactedfiles().size());
Store store = this.region.getStore(e.getKey()); if (store == null || e.getValue() == null) { continue;
HStoreFile hsf = ((Collection<HStoreFile>)region.getStore(familyNameBytes).getStorefiles()) .iterator().next(); long readPt = ((HRegion)region).getReadPoint(IsolationLevel.READ_COMMITTED);
for (HStoreFile sf : (Collection<HStoreFile>)region.getStore(familyNameBytes).getStorefiles()) { synchronized (sf) { if (count < refSFCount) { assertEquals(1, region.getStoreFileList(new byte[][]{familyNameBytes}).size()); assertEquals(refSFCount+1, ((HStore)region.getStore(familyNameBytes)).getStoreEngine().getStoreFileManager() .getCompactedfiles().size()); assertEquals(1, region.getStoreFileList(new byte[][]{familyNameBytes}).size()); assertEquals(0, ((HStore)region.getStore(familyNameBytes)).getStoreEngine().getStoreFileManager() .getCompactedfiles().size());
public int getNumHFilesForRS(final HRegionServer rs, final TableName tableName, final byte[] family) { int numHFiles = 0; for (Region region : rs.getRegions(tableName)) { numHFiles += region.getStore(family).getStorefilesCount(); } return numHFiles; }
HStoreFile hsf = ((Collection<HStoreFile>)region.getStore(familyNameBytes).getStorefiles()) .iterator().next(); long readPt = ((HRegion)region).getReadPoint(IsolationLevel.READ_COMMITTED);
byte[] family = "testF1".getBytes(); when(mockRegion.getStore(family)).thenReturn(mockStore1); when(mockRegion.getRegionInfo()).thenReturn(mockRegionInfo); when(mockRegionInfo.getRegionNameAsString()).thenReturn("test_region_1");
cf1StoreFileCount = region.getStore(FAMILY1).getStorefilesCount(); cf2StoreFileCount = region.getStore(FAMILY2).getStorefilesCount(); cf3StoreFileCount = region.getStore(FAMILY3).getStorefilesCount(); } finally { TEST_UTIL.shutdownMiniCluster(); cf1StoreFileCount1 = region.getStore(FAMILY1).getStorefilesCount(); cf2StoreFileCount1 = region.getStore(FAMILY2).getStorefilesCount(); cf3StoreFileCount1 = region.getStore(FAMILY3).getStorefilesCount(); } finally { TEST_UTIL.shutdownMiniCluster();
public void testCompactionConfigurationOnlineChange() throws IOException { String strPrefix = "hbase.hstore.compaction."; Store s = r1.getStore(COLUMN_FAMILY1); if (!(s instanceof HStore)) { LOG.error("Can't test the compaction configuration of HStore class. "
private boolean checkForReferenceFiles() { if(!ScanUtil.isLocalIndex(scan)) return false; for (byte[] family : scan.getFamilies()) { if (getRegion().getStore(family).hasReferences()) { return true; } } return false; }
public int getNumHFilesForRS(final HRegionServer rs, final TableName tableName, final byte[] family) { int numHFiles = 0; for (Region region : rs.getRegions(tableName)) { numHFiles += region.getStore(family).getStorefilesCount(); } return numHFiles; }
byte[] family = "testF1".getBytes(); when(mockRegion.getStore(family)).thenReturn(mockStore1); when(mockRegion.getRegionInfo()).thenReturn(mockRegionInfo); when(mockRegionInfo.getRegionNameAsString()).thenReturn("test_region_1");
if (request.hasFamily()) { family = request.getFamily().toByteArray(); store = region.getStore(family); if (store == null) { throw new ServiceException(new IOException("column family " + Bytes.toString(family)