@Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); queries = new HashMap<>(); averagingMetric = registerAveragingMetric("foo", context); countMetric = registerAbsoluteCountMetric("bar", context); }
@Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); // Set the record component into the classifier classifier.setRecordComponent(recordComponent); // Set up the stats report intervals statsTickInterval = config.getAs(BulletStormConfig.FILTER_BOLT_STATS_REPORT_TICKS, Integer.class); statsTickCount = 0; // Set up the manager manager = new QueryManager(config); if (metricsEnabled) { averageLatency = registerAveragingMetric(TopologyConstants.LATENCY_METRIC, context); } }
@Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); // Set the record component into the classifier classifier.setRecordComponent(recordComponent); // Set up the stats report intervals statsTickInterval = config.getAs(BulletStormConfig.FILTER_BOLT_STATS_REPORT_TICKS, Integer.class); statsTickCount = 0; // Set up the manager manager = new QueryManager(config); if (metricsEnabled) { averageLatency = registerAveragingMetric(TopologyConstants.LATENCY_METRIC, context); } }
@SuppressWarnings("unchecked") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); bufferedMetadata = new HashMap<>(); queries = new HashMap<>(); int preStartDelayTicks = config.getAs(BulletStormConfig.JOIN_BOLT_WINDOW_PRE_START_DELAY_TICKS, Integer.class); preStartBuffer = new RotatingMap<>(preStartDelayTicks); int postFinishBufferTicks = config.getAs(BulletStormConfig.JOIN_BOLT_QUERY_POST_FINISH_BUFFER_TICKS, Integer.class); postFinishBuffer = new RotatingMap<>(postFinishBufferTicks); if (metricsEnabled) { activeQueriesCount = registerAbsoluteCountMetric(TopologyConstants.ACTIVE_QUERIES_METRIC, context); createdQueriesCount = registerAbsoluteCountMetric(TopologyConstants.CREATED_QUERIES_METRIC, context); improperQueriesCount = registerAbsoluteCountMetric(TopologyConstants.IMPROPER_QUERIES_METRIC, context); rateExceededQueries = registerAbsoluteCountMetric(TopologyConstants.RATE_EXCEEDED_QUERIES_METRIC, context); duplicatedQueriesCount = registerAbsoluteCountMetric(TopologyConstants.DUPLICATED_QUERIES_METRIC, context); } }
@SuppressWarnings("unchecked") @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { super.prepare(stormConf, context, collector); bufferedMetadata = new HashMap<>(); queries = new HashMap<>(); int preStartDelayTicks = config.getAs(BulletStormConfig.JOIN_BOLT_WINDOW_PRE_START_DELAY_TICKS, Integer.class); preStartBuffer = new RotatingMap<>(preStartDelayTicks); int postFinishBufferTicks = config.getAs(BulletStormConfig.JOIN_BOLT_QUERY_POST_FINISH_BUFFER_TICKS, Integer.class); postFinishBuffer = new RotatingMap<>(postFinishBufferTicks); if (metricsEnabled) { activeQueriesCount = registerAbsoluteCountMetric(TopologyConstants.ACTIVE_QUERIES_METRIC, context); createdQueriesCount = registerAbsoluteCountMetric(TopologyConstants.CREATED_QUERIES_METRIC, context); improperQueriesCount = registerAbsoluteCountMetric(TopologyConstants.IMPROPER_QUERIES_METRIC, context); rateExceededQueries = registerAbsoluteCountMetric(TopologyConstants.RATE_EXCEEDED_QUERIES_METRIC, context); duplicatedQueriesCount = registerAbsoluteCountMetric(TopologyConstants.DUPLICATED_QUERIES_METRIC, context); } }