Search in sources :

Example 6 with SinkContext

use of org.apache.heron.spi.metricsmgr.sink.SinkContext in project heron by twitter.

the class SinkExecutorTest method before.

@Before
public void before() throws Exception {
    metricsSink = new DummyMetricsSink(EXPECTED_RECORDS, EXPECTED_FLUSHES);
    executorLooper = new ExecutorLooper();
    communicator = new Communicator<>(null, executorLooper);
    SinkContext sinkContext = new SinkContextImpl("topology-name", "cluster", "role", "environment", "metricsmgr-id", "sink-id", new MultiCountMetric());
    sinkExecutor = new SinkExecutor("testSinkId", metricsSink, executorLooper, communicator, sinkContext);
}
Also used : ExecutorLooper(org.apache.heron.common.basics.ExecutorLooper) SinkContext(org.apache.heron.spi.metricsmgr.sink.SinkContext) SinkContextImpl(org.apache.heron.metricsmgr.sink.SinkContextImpl) MultiCountMetric(org.apache.heron.api.metric.MultiCountMetric) Before(org.junit.Before)

Aggregations

SinkContext (org.apache.heron.spi.metricsmgr.sink.SinkContext)6 HashMap (java.util.HashMap)4 MultiCountMetric (org.apache.heron.api.metric.MultiCountMetric)4 SinkContextImpl (org.apache.heron.metricsmgr.sink.SinkContextImpl)4 Test (org.junit.Test)3 ExecutorLooper (org.apache.heron.common.basics.ExecutorLooper)2 TopologyManager (org.apache.heron.proto.tmanager.TopologyManager)2 Before (org.junit.Before)2 Communicator (org.apache.heron.common.basics.Communicator)1 MetricsCollector (org.apache.heron.common.utils.metrics.MetricsCollector)1 SinkExecutor (org.apache.heron.metricsmgr.executor.SinkExecutor)1 MetricsRecord (org.apache.heron.spi.metricsmgr.metrics.MetricsRecord)1 IMetricsSink (org.apache.heron.spi.metricsmgr.sink.IMetricsSink)1