Search in sources :

Example 1 with GatewayMetrics

use of com.twitter.heron.metrics.GatewayMetrics in project heron by twitter.

the class ConnectTest method before.

@Before
public void before() throws Exception {
    UnitTestHelper.addSystemConfigToSingleton();
    nioLooper = new NIOLooper();
    slaveLooper = new SlaveLooper();
    inStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(nioLooper, slaveLooper);
    inStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    outStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(slaveLooper, nioLooper);
    outStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    inControlQueue = new Communicator<InstanceControlMsg>(nioLooper, slaveLooper);
    gatewayMetrics = new GatewayMetrics();
    threadsPool = Executors.newSingleThreadExecutor();
    // Get an available port
    serverPort = SysUtils.getFreePort();
}
Also used : InstanceControlMsg(com.twitter.heron.instance.InstanceControlMsg) SlaveLooper(com.twitter.heron.common.basics.SlaveLooper) NIOLooper(com.twitter.heron.common.basics.NIOLooper) GatewayMetrics(com.twitter.heron.metrics.GatewayMetrics) Before(org.junit.Before)

Example 2 with GatewayMetrics

use of com.twitter.heron.metrics.GatewayMetrics in project heron by twitter.

the class HandleReadTest method before.

@Before
public void before() throws Exception {
    UnitTestHelper.addSystemConfigToSingleton();
    nioLooper = new NIOLooper();
    slaveLooper = new SlaveLooper();
    inStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(nioLooper, slaveLooper);
    inStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    outStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(slaveLooper, nioLooper);
    outStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    inControlQueue = new Communicator<InstanceControlMsg>(nioLooper, slaveLooper);
    gatewayMetrics = new GatewayMetrics();
    threadsPool = Executors.newSingleThreadExecutor();
    // Get an available port
    serverPort = SysUtils.getFreePort();
}
Also used : InstanceControlMsg(com.twitter.heron.instance.InstanceControlMsg) SlaveLooper(com.twitter.heron.common.basics.SlaveLooper) NIOLooper(com.twitter.heron.common.basics.NIOLooper) GatewayMetrics(com.twitter.heron.metrics.GatewayMetrics) Before(org.junit.Before)

Example 3 with GatewayMetrics

use of com.twitter.heron.metrics.GatewayMetrics in project heron by twitter.

the class HandleWriteTest method before.

@Before
public void before() throws Exception {
    UnitTestHelper.addSystemConfigToSingleton();
    nioLooper = new NIOLooper();
    slaveLooper = new SlaveLooper();
    inStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(nioLooper, slaveLooper);
    inStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    outStreamQueue = new Communicator<HeronTuples.HeronTupleSet>(slaveLooper, nioLooper);
    outStreamQueue.init(Constants.QUEUE_BUFFER_SIZE, Constants.QUEUE_BUFFER_SIZE, 0.5);
    inControlQueue = new Communicator<InstanceControlMsg>(nioLooper, slaveLooper);
    gatewayMetrics = new GatewayMetrics();
    threadsPool = Executors.newSingleThreadExecutor();
    // Get an available port
    serverPort = SysUtils.getFreePort();
}
Also used : InstanceControlMsg(com.twitter.heron.instance.InstanceControlMsg) SlaveLooper(com.twitter.heron.common.basics.SlaveLooper) NIOLooper(com.twitter.heron.common.basics.NIOLooper) GatewayMetrics(com.twitter.heron.metrics.GatewayMetrics) Before(org.junit.Before)

Aggregations

NIOLooper (com.twitter.heron.common.basics.NIOLooper)3 SlaveLooper (com.twitter.heron.common.basics.SlaveLooper)3 InstanceControlMsg (com.twitter.heron.instance.InstanceControlMsg)3 GatewayMetrics (com.twitter.heron.metrics.GatewayMetrics)3 Before (org.junit.Before)3