• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ReducedMetric类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.storm.metric.api.ReducedMetric的典型用法代码示例。如果您正苦于以下问题:Java ReducedMetric类的具体用法?Java ReducedMetric怎么用?Java ReducedMetric使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ReducedMetric类属于org.apache.storm.metric.api包,在下文中一共展示了ReducedMetric类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initializeAndRegisterAllMetrics

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
private void initializeAndRegisterAllMetrics(TopologyContext context, int timeBucketSize) {
    this.failureMetric                  = new CombinedMetric(new MaxMetric());
    this.successCountMetric             = new CountMetric();
    this.sidelineCountMetric            = new CountMetric();
    this.internalBufferSize             = new CombinedMetric(new MaxMetric());
    this.pendingMessageSize             = new CombinedMetric(new MaxMetric());
    this.currentBinLogFileNumber        = new CombinedMetric(new MaxMetric());
    this.currentBinLogFilePosition      = new CombinedMetric(new MaxMetric());
    this.txEventProcessTime             = new ReducedMetric(new MeanReducer());
    this.txEventFailTimeInTopology      = new ReducedMetric(new MeanReducer());

    context.registerMetric(SpoutConstants.METRIC_FAILURECOUNT, this.failureMetric, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_SUCCESSCOUNT, this.successCountMetric, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_SIDELINECOUNT, this.sidelineCountMetric, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_BUFFER_SIZE, this.internalBufferSize, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_PENDING_MESSAGES, this.pendingMessageSize, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_TXPROCESSTIME, this.txEventProcessTime, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_BINLOG_FILE_NUM, this.currentBinLogFileNumber, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_BIN_LOG_FILE_POS, this.currentBinLogFilePosition, timeBucketSize);
    context.registerMetric(SpoutConstants.METRIC_FAIL_MSG_IN_TOPOLOGY, this.txEventFailTimeInTopology, timeBucketSize);

}
 
开发者ID:flipkart-incubator,项目名称:storm-mysql,代码行数:23,代码来源:MySqlBinLogSpout.java


示例2: prepare

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public void prepare(Map stormConf, TopologyContext context,
        OutputCollector collector) {
    super.prepare(stormConf, context, collector);
    sniffWhenNoSMKey = ConfUtils.getBoolean(stormConf,
            "sitemap.sniffContent", false);
    filterHoursSinceModified = ConfUtils.getInt(stormConf,
            "sitemap.filter.hours.since.modified", -1);
    parseFilters = ParseFilters.fromConf(stormConf);
    maxOffsetGuess = ConfUtils.getInt(stormConf, "sitemap.offset.guess",
            300);
    averagedMetrics = context.registerMetric(
            "sitemap_average_processing_time", new ReducedMetric(
                    new MeanReducer()), 30);
}
 
开发者ID:DigitalPebble,项目名称:storm-crawler,代码行数:17,代码来源:SiteMapParserBolt.java


示例3: registerAveragingMetric

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
private ReducedMetric registerAveragingMetric(String name, TopologyContext context) {
    Number interval = metricsIntervalMapping.getOrDefault(name,
                                                          metricsIntervalMapping.get(DEFAULT_BUILT_IN_METRICS_INTERVAL_KEY));
    log.info("Registered {} with interval {}", name, interval);
    return context.registerMetric(name, new ReducedMetric(new MeanReducer()), interval.intValue());
}
 
开发者ID:yahoo,项目名称:bullet-storm,代码行数:7,代码来源:FilterBolt.java


示例4: registerMetric

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public ReducedMetric registerMetric(String name, IReducer reducer, int timeBucketSizeInSecs) {
  return registerMetric(name, new ReducedMetric(reducer), timeBucketSizeInSecs);
}
 
开发者ID:twitter,项目名称:heron,代码行数:5,代码来源:TopologyContext.java


示例5: registerMetric

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
ReducedMetric registerMetric(String name, IReducer reducer, int timeBucketSizeInSecs);
 
开发者ID:twitter,项目名称:heron,代码行数:3,代码来源:IMetricsContext.java


示例6: registerMetric

import org.apache.storm.metric.api.ReducedMetric; //导入依赖的package包/类
/**
 * Not supported by Flink.
 *
 * @throws UnsupportedOperationException
 * 		at every invocation
 */
@SuppressWarnings("rawtypes")
@Override
public ReducedMetric registerMetric(final String name, final IReducer combiner, final int timeBucketSizeInSecs) {
	throw new UnsupportedOperationException("Metrics are not supported by Flink");
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:12,代码来源:FlinkTopologyContext.java



注:本文中的org.apache.storm.metric.api.ReducedMetric类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HttpCacheContext类代码示例发布时间:2022-05-22
下一篇:
Java RemoveDefaultAclResponseProto类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap