本文整理了Java中org.apache.hadoop.hbase.regionserver.Store.getCompactionPressure()
方法的一些代码示例,展示了Store.getCompactionPressure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getCompactionPressure()
方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.Store
类名称:Store
方法名:getCompactionPressure
[英]This value can represent the degree of emergency of compaction for this store. It should be greater than or equal to 0.0, any value greater than 1.0 means we have too many store files.
And for striped stores, we should calculate this value by the files in each stripe separately and return the maximum value.
It is similar to #getCompactPriority() except that it is more suitable to use in a linear formula.
[中]该值可以表示该商店的紧急压实程度。它应该大于或等于0.0,任何大于1.0的值都意味着存储文件太多。
*如果getStorefilesCount<=getMinFilesToCompact,则返回0.0
*return(getstorefilescont-getMinFilesToCompact)/(blockingFileCount-getMinFilesToCompact)
对于条带存储,我们应该通过每个条带中的文件分别计算这个值,并返回最大值。
它与#getCompactPriority()类似,只是更适合在线性公式中使用。
代码示例来源:origin: apache/hbase
@Override
public double getCompactionPressure() {
double max = 0;
for (Region region : onlineRegions.values()) {
for (Store store : region.getStores()) {
double normCount = store.getCompactionPressure();
if (normCount > max) {
max = normCount;
}
}
}
return max;
}
代码示例来源:origin: harbby/presto-connectors
@Override
public double getCompactionPressure() {
double max = 0;
for (Region region : onlineRegions.values()) {
for (Store store : region.getStores()) {
double normCount = store.getCompactionPressure();
if (normCount > max) {
max = normCount;
}
}
}
return max;
}
内容来源于网络,如有侵权,请联系作者删除!