Class TridentOperationContext
- java.lang.Object
-
- org.apache.storm.trident.operation.TridentOperationContext
-
- All Implemented Interfaces:
IMetricsContext
public class TridentOperationContext extends Object implements IMetricsContext
-
-
Constructor Summary
Constructors Constructor Description TridentOperationContext(TopologyContext topoContext, TridentTuple.Factory factory)
TridentOperationContext(TridentOperationContext parent, TridentTuple.Factory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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>
TregisterMetric(String name, T metric, int timeBucketSizeInSecs)
Register metric.void
registerMetricSet(String prefix, com.codahale.metrics.MetricSet set)
com.codahale.metrics.Timer
registerTimer(String name)
-
-
-
Constructor Detail
-
TridentOperationContext
public TridentOperationContext(TopologyContext topoContext, TridentTuple.Factory factory)
-
TridentOperationContext
public TridentOperationContext(TridentOperationContext parent, TridentTuple.Factory factory)
-
-
Method Detail
-
makeProjectionFactory
public TridentTupleView.ProjectionFactory makeProjectionFactory(Fields fields)
-
numPartitions
public int numPartitions()
-
getPartitionIndex
public int getPartitionIndex()
-
registerMetric
public <T extends IMetric> T registerMetric(String name, T metric, int timeBucketSizeInSecs)
Description copied from interface:IMetricsContext
Register metric.- Specified by:
registerMetric
in interfaceIMetricsContext
-
registerMetric
public ReducedMetric registerMetric(String name, IReducer reducer, int timeBucketSizeInSecs)
Description copied from interface:IMetricsContext
Register metric.- Specified by:
registerMetric
in interfaceIMetricsContext
-
registerMetric
public CombinedMetric registerMetric(String name, ICombiner combiner, int timeBucketSizeInSecs)
Description copied from interface:IMetricsContext
Register metric.- Specified by:
registerMetric
in interfaceIMetricsContext
-
registerTimer
public com.codahale.metrics.Timer registerTimer(String name)
- Specified by:
registerTimer
in interfaceIMetricsContext
-
registerHistogram
public com.codahale.metrics.Histogram registerHistogram(String name)
- Specified by:
registerHistogram
in interfaceIMetricsContext
-
registerMeter
public com.codahale.metrics.Meter registerMeter(String name)
- Specified by:
registerMeter
in interfaceIMetricsContext
-
registerCounter
public com.codahale.metrics.Counter registerCounter(String name)
- Specified by:
registerCounter
in interfaceIMetricsContext
-
registerGauge
public <T> com.codahale.metrics.Gauge<T> registerGauge(String name, com.codahale.metrics.Gauge<T> gauge)
- Specified by:
registerGauge
in interfaceIMetricsContext
-
registerMetricSet
public void registerMetricSet(String prefix, com.codahale.metrics.MetricSet set)
- Specified by:
registerMetricSet
in interfaceIMetricsContext
-
-