本文整理汇总了Java中com.alibaba.rocketmq.common.UtilAll.getDiskPartitionSpaceUsedPercent方法的典型用法代码示例。如果您正苦于以下问题:Java UtilAll.getDiskPartitionSpaceUsedPercent方法的具体用法?Java UtilAll.getDiskPartitionSpaceUsedPercent怎么用?Java UtilAll.getDiskPartitionSpaceUsedPercent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alibaba.rocketmq.common.UtilAll
的用法示例。
在下文中一共展示了UtilAll.getDiskPartitionSpaceUsedPercent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: diskUtil
import com.alibaba.rocketmq.common.UtilAll; //导入方法依赖的package包/类
private String diskUtil() {
String storePathPhysic = this.brokerController.getMessageStoreConfig().getStorePathCommitLog();
double physicRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathPhysic);
String storePathLogis =
StorePathConfigHelper.getStorePathConsumeQueue(this.brokerController.getMessageStoreConfig().getStorePathRootDir());
double logisRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathLogis);
String storePathIndex =
StorePathConfigHelper.getStorePathIndex(this.brokerController.getMessageStoreConfig().getStorePathRootDir());
double indexRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathIndex);
return String.format("CL: %5.2f CQ: %5.2f INDEX: %5.2f", physicRatio, logisRatio, indexRatio);
}
示例2: diskUtil
import com.alibaba.rocketmq.common.UtilAll; //导入方法依赖的package包/类
private static String diskUtil() {
String storePathPhysic = System.getenv("HOME");
double physicRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathPhysic);
String storePathLogis = storePathPhysic;
double logisRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathLogis);
String storePathIndex = storePathPhysic;
double indexRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathIndex);
return String.format("CL: %5.2f CQ: %5.2f INDEX: %5.2f", physicRatio, logisRatio, indexRatio);
}
示例3: diskUtil
import com.alibaba.rocketmq.common.UtilAll; //导入方法依赖的package包/类
private String diskUtil() {
String storePathPhysic = this.brokerController.getMessageStoreConfig().getStorePathCommitLog();
double physicRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathPhysic);
String storePathLogis = this.brokerController.getMessageStoreConfig().getStorePathConsumeQueue();
double logisRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathLogis);
String storePathIndex = this.brokerController.getMessageStoreConfig().getStorePathIndex();
double indexRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathIndex);
return String.format("CL: %5.2f CQ: %5.2f INDEX: %5.2f", physicRatio, logisRatio, indexRatio);
}
示例4: getRuntimeInfo
import com.alibaba.rocketmq.common.UtilAll; //导入方法依赖的package包/类
@Override
public HashMap<String, String> getRuntimeInfo() {
HashMap<String, String> result = this.storeStatsService.getRuntimeInfo();
// 检测物理文件磁盘空间
{
String storePathPhysic = DefaultMessageStore.this.getMessageStoreConfig().getStorePathCommitLog();
double physicRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathPhysic);
result.put(RunningStats.commitLogDiskRatio.name(), String.valueOf(physicRatio));
}
// 检测逻辑文件磁盘空间
{
String storePathLogics =
DefaultMessageStore.this.getMessageStoreConfig().getStorePathConsumeQueue();
double logicsRatio = UtilAll.getDiskPartitionSpaceUsedPercent(storePathLogics);
result.put(RunningStats.consumeQueueDiskRatio.name(), String.valueOf(logicsRatio));
}
// 延时进度
{
if (this.scheduleMessageService != null) {
this.scheduleMessageService.buildRunningStats(result);
}
}
result.put(RunningStats.commitLogMinOffset.name(),
String.valueOf(DefaultMessageStore.this.getMinPhyOffset()));
result.put(RunningStats.commitLogMaxOffset.name(),
String.valueOf(DefaultMessageStore.this.getMaxPhyOffset()));
return result;
}