use of org.apache.heron.common.basics.NIOLooper in project heron by twitter.
the class MetricsManagerServerTest method before.
@Before
public void before() throws IOException {
metricsManagerServer = new MetricsManagerServer(new NIOLooper(), HeronServerTester.SERVER_HOST, SysUtils.getFreePort(), HeronServerTester.TEST_SOCKET_OPTIONS, new MultiCountMetric());
serverTester = new HeronServerTester(metricsManagerServer, new MetricsManagerClientRequestHandler(), new HeronServerTester.SuccessResponseHandler(Metrics.MetricPublisherRegisterResponse.class, new MetricsManagerClientResponseHandler(MESSAGE_SIZE)), RESPONSE_RECEIVED_TIMEOUT);
}
use of org.apache.heron.common.basics.NIOLooper in project heron by twitter.
the class CheckpointManager method init.
public void init(String topologyName, String topologyId, String checkpointMgrId, String serverHost, int serverPort, SystemConfig systemConfig, CheckpointManagerConfig checkpointManagerConfig) throws IOException, CheckpointManagerException {
LOG.info("Initializing CheckpointManager");
checkpointManagerServerLoop = new NIOLooper();
HeronSocketOptions serverSocketOptions = new HeronSocketOptions(checkpointManagerConfig.getWriteBatchSize(), checkpointManagerConfig.getWriteBatchTime(), checkpointManagerConfig.getReadBatchSize(), checkpointManagerConfig.getReadBatchTime(), checkpointManagerConfig.getSocketSendSize(), checkpointManagerConfig.getSocketReceiveSize(), checkpointManagerConfig.getMaximumPacketSize());
// Setup the IStatefulStorage
IStatefulStorage statefulStorage = setupStatefulStorage(topologyName, checkpointManagerConfig);
// Start the server
this.checkpointManagerServer = new CheckpointManagerServer(topologyName, topologyId, checkpointMgrId, statefulStorage, checkpointManagerServerLoop, serverHost, serverPort, serverSocketOptions);
}
Aggregations