当前位置: 首页>>代码示例>>Java>>正文


Java UtilAll.getDiskPartitionSpaceUsedPercent方法代码示例

本文整理汇总了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);
}
 
开发者ID:y123456yz,项目名称:reading-and-annotate-rocketmq-3.4.6,代码行数:15,代码来源:SendMessageProcessor.java

示例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);
}
 
开发者ID:diwayou,项目名称:rocketmq-all-trans,代码行数:13,代码来源:Test.java

示例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);
}
 
开发者ID:diwayou,项目名称:rocketmq-all-trans,代码行数:13,代码来源:SendMessageProcessor.java

示例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;
}
 
开发者ID:diwayou,项目名称:rocketmq-all-trans,代码行数:34,代码来源:DefaultMessageStore.java


注:本文中的com.alibaba.rocketmq.common.UtilAll.getDiskPartitionSpaceUsedPercent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。