public class TridentOperationContext extends Object implements IMetricsContext
Constructor and Description |
---|
TridentOperationContext(TopologyContext topoContext,
TridentTuple.Factory factory) |
TridentOperationContext(TridentOperationContext parent,
TridentTuple.Factory factory) |
Modifier and Type | Method and Description |
---|---|
int |
getPartitionIndex() |
TridentTupleView.ProjectionFactory |
makeProjectionFactory(Fields fields) |
int |
numPartitions() |
com.codahale.metrics.Counter |
registerCounter(String name) |
<T> com.codahale.metrics.Gauge<T> |
registerGauge(String name,
com.codahale.metrics.Gauge<T> gauge) |
com.codahale.metrics.Histogram |
registerHistogram(String name) |
com.codahale.metrics.Meter |
registerMeter(String name) |
CombinedMetric |
registerMetric(String name,
ICombiner combiner,
int timeBucketSizeInSecs)
Register metric.
|
ReducedMetric |
registerMetric(String name,
IReducer reducer,
int timeBucketSizeInSecs)
Register metric.
|
<T extends IMetric> |
registerMetric(String name,
T metric,
int timeBucketSizeInSecs)
Register metric.
|
void |
registerMetricSet(String prefix,
com.codahale.metrics.MetricSet set) |
com.codahale.metrics.Timer |
registerTimer(String name) |
public TridentOperationContext(TopologyContext topoContext, TridentTuple.Factory factory)
public TridentOperationContext(TridentOperationContext parent, TridentTuple.Factory factory)
public TridentTupleView.ProjectionFactory makeProjectionFactory(Fields fields)
public int numPartitions()
public int getPartitionIndex()
public <T extends IMetric> T registerMetric(String name, T metric, int timeBucketSizeInSecs)
IMetricsContext
registerMetric
in interface IMetricsContext
public ReducedMetric registerMetric(String name, IReducer reducer, int timeBucketSizeInSecs)
IMetricsContext
registerMetric
in interface IMetricsContext
public CombinedMetric registerMetric(String name, ICombiner combiner, int timeBucketSizeInSecs)
IMetricsContext
registerMetric
in interface IMetricsContext
public com.codahale.metrics.Timer registerTimer(String name)
registerTimer
in interface IMetricsContext
public com.codahale.metrics.Histogram registerHistogram(String name)
registerHistogram
in interface IMetricsContext
public com.codahale.metrics.Meter registerMeter(String name)
registerMeter
in interface IMetricsContext
public com.codahale.metrics.Counter registerCounter(String name)
registerCounter
in interface IMetricsContext
public <T> com.codahale.metrics.Gauge<T> registerGauge(String name, com.codahale.metrics.Gauge<T> gauge)
registerGauge
in interface IMetricsContext
public void registerMetricSet(String prefix, com.codahale.metrics.MetricSet set)
registerMetricSet
in interface IMetricsContext
Copyright © 2023 The Apache Software Foundation. All rights reserved.