org.apache.hadoop.hbase.regionserver.Store.getStorefilesCount()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(202)

本文整理了Java中org.apache.hadoop.hbase.regionserver.Store.getStorefilesCount()方法的一些代码示例,展示了Store.getStorefilesCount()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getStorefilesCount()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.Store
类名称:Store
方法名:getStorefilesCount

Store.getStorefilesCount介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

private int getStoreFileCount(Region region) {
 int count = 0;
 for (Store store : region.getStores()) {
  count += store.getStorefilesCount();
 }
 return count;
}

代码示例来源:origin: apache/hbase

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;
}

代码示例来源:origin: apache/hbase

mt.storeFileCount += store.getStorefilesCount();
mt.memstoreSize += (store.getMemStoreSize().getDataSize() +
 store.getMemStoreSize().getHeapSize() + store.getMemStoreSize().getOffHeapSize());
mt.minStoreFileAge = Math.min(mt.minStoreFileAge, store.getMinStoreFileAge().getAsLong());
mt.totalStoreFileAge = (long)store.getAvgStoreFileAge().getAsDouble() *
  store.getStorefilesCount();
mt.storeCount += 1;

代码示例来源:origin: apache/hbase

if (region.stores != null) {
 for (Store store : region.stores.values()) {
  tempNumStoreFiles += store.getStorefilesCount();
  tempMemstoreSize += store.getMemStoreSize().getDataSize();
  tempStoreFileSize += store.getStorefilesSize();

代码示例来源:origin: apache/hbase

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();

代码示例来源:origin: apache/hbase

tempNumStores += storeList.size();
for (Store store : storeList) {
 tempNumStoreFiles += store.getStorefilesCount();
 tempMemstoreSize += store.getMemStoreSize().getDataSize();
 tempStoreFileSize += store.getStorefilesSize();

代码示例来源:origin: apache/hbase

public static void compactAndBlockUntilDone(Admin admin, HRegionServer rs, byte[] regionName)
  throws IOException, InterruptedException {
 log("Compacting region: " + Bytes.toStringBinary(regionName));
 admin.majorCompactRegion(regionName);
 log("blocking until compaction is complete: " + Bytes.toStringBinary(regionName));
 Threads.sleepWithoutInterrupt(500);
 outer: for (;;) {
  for (Store store : rs.getOnlineRegion(regionName).getStores()) {
   if (store.getStorefilesCount() > 1) {
    Threads.sleep(50);
    continue outer;
   }
  }
  break;
 }
}

代码示例来源:origin: apache/hbase

Assert.assertEquals(1, secondaryRegion.getStore(f).getStorefilesCount());
Assert.assertEquals(3, secondaryRegion.getStore(f).getStorefilesCount());
Assert.assertEquals(4, secondaryRegion.getStore(f).getStorefilesCount());

代码示例来源:origin: apache/hbase

assertEquals("Should have no WAL after initial writes", 0,
 AbstractFSWALProvider.getNumRolledLogFiles(log));
assertEquals(2, s.getStorefilesCount());
for (int waitTime = 3000; s.getStorefilesCount() > 1 && waitTime > 0; waitTime -= 200) {
 Threads.sleepWithoutInterrupt(200);
assertEquals("Compaction didn't happen", 1, s.getStorefilesCount());

代码示例来源:origin: apache/hbase

Assert.assertEquals(3, secondaryRegion.getStore(f).getStorefilesCount());

代码示例来源:origin: co.cask.hbase/hbase

private boolean isTooManyStoreFiles(HRegion region) {
 for (Store hstore: region.stores.values()) {
  if (hstore.getStorefilesCount() > this.blockingStoreFilesNumber) {
   return true;
  }
 }
 return false;
}

代码示例来源:origin: harbby/presto-connectors

@Override
 public void run() {
  long tempNumStoreFiles = 0;
  long tempMemstoreSize = 0;
  long tempStoreFileSize = 0;
  if (region.stores != null) {
   for (Store store : region.stores.values()) {
    tempNumStoreFiles += store.getStorefilesCount();
    tempMemstoreSize += store.getMemStoreSize();
    tempStoreFileSize += store.getStorefilesSize();
   }
  }
  numStoreFiles = tempNumStoreFiles;
  memstoreSize = tempMemstoreSize;
  storeFileSize = tempStoreFileSize;
 }
}

代码示例来源:origin: co.cask.hbase/hbase

stores += r.stores.size();
for (Store store : r.stores.values()) {
 storefiles += store.getStorefilesCount();
 storefileSizeMB += (int) (store.getStorefilesSize() / 1024 / 1024);
 storefileIndexSizeMB += (int) (store.getStorefilesIndexSize() / 1024 / 1024);

代码示例来源:origin: org.apache.hbase/hbase-server

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;
}

代码示例来源:origin: co.cask.hbase/hbase

stores += r.stores.size();
for (Store store : r.stores.values()) {
 storefiles += store.getStorefilesCount();
 storeUncompressedSizeMB += (int) (store.getStoreSizeUncompressed()
   / 1024 / 1024);

代码示例来源:origin: harbby/presto-connectors

this.cellsPerHeartbeatCheck = scanInfo.getCellsPerTimeoutCheck();
if (this.store != null && this.store.getStorefilesCount() > 1) {
 RegionServerServices rsService = ((HStore)store).getHRegion().getRegionServerServices();
 if (rsService != null && scanInfo.isParallelSeekEnabled()) {

代码示例来源:origin: org.apache.hbase/hbase-server

public static void compactAndBlockUntilDone(Admin admin, HRegionServer rs, byte[] regionName)
  throws IOException, InterruptedException {
 log("Compacting region: " + Bytes.toStringBinary(regionName));
 admin.majorCompactRegion(regionName);
 log("blocking until compaction is complete: " + Bytes.toStringBinary(regionName));
 Threads.sleepWithoutInterrupt(500);
 outer: for (;;) {
  for (Store store : rs.getOnlineRegion(regionName).getStores()) {
   if (store.getStorefilesCount() > 1) {
    Threads.sleep(50);
    continue outer;
   }
  }
  break;
 }
}

代码示例来源:origin: org.apache.hbase/hbase-server

Assert.assertEquals(1, secondaryRegion.getStore(f).getStorefilesCount());
Assert.assertEquals(3, secondaryRegion.getStore(f).getStorefilesCount());
Assert.assertEquals(4, secondaryRegion.getStore(f).getStorefilesCount());

代码示例来源:origin: org.apache.hbase/hbase-server

Assert.assertEquals(3, secondaryRegion.getStore(f).getStorefilesCount());

代码示例来源:origin: org.apache.hbase/hbase-server

assertEquals("Should have no WAL after initial writes", 0,
 AbstractFSWALProvider.getNumRolledLogFiles(log));
assertEquals(2, s.getStorefilesCount());
for (int waitTime = 3000; s.getStorefilesCount() > 1 && waitTime > 0; waitTime -= 200) {
 Threads.sleepWithoutInterrupt(200);
assertEquals("Compaction didn't happen", 1, s.getStorefilesCount());

相关文章