use of com.hazelcast.client.impl.protocol.ClientExceptionFactory in project hazelcast by hazelcast.
the class JetServiceBackend method init.
// ManagedService
@Override
public void init(NodeEngine engine, Properties hzProperties) {
this.nodeEngine = (NodeEngineImpl) engine;
this.jet = new JetInstanceImpl(nodeEngine.getNode().hazelcastInstance, jetConfig);
jobRepository = new JobRepository(engine.getHazelcastInstance());
taskletExecutionService = new TaskletExecutionService(nodeEngine, jetConfig.getCooperativeThreadCount(), nodeEngine.getProperties());
jobCoordinationService = createJobCoordinationService();
jobClassLoaderService = new JobClassLoaderService(nodeEngine, jobRepository);
jobExecutionService = new JobExecutionService(nodeEngine, taskletExecutionService, jobClassLoaderService);
MetricsService metricsService = nodeEngine.getService(MetricsService.SERVICE_NAME);
metricsService.registerPublisher(nodeEngine -> new JobMetricsPublisher(jobExecutionService, nodeEngine.getLocalMember()));
nodeEngine.getMetricsRegistry().registerDynamicMetricsProvider(jobExecutionService);
networking = new Networking(engine, jobExecutionService, jetConfig.getFlowControlPeriodMs());
ClientEngine clientEngine = engine.getService(ClientEngineImpl.SERVICE_NAME);
ClientExceptionFactory clientExceptionFactory = clientEngine.getExceptionFactory();
if (clientExceptionFactory != null) {
ExceptionUtil.registerJetExceptions(clientExceptionFactory);
} else {
logger.fine("Jet exceptions are not registered to the ClientExceptionFactory" + " since the ClientExceptionFactory is not accessible.");
}
logger.info("Setting number of cooperative threads and default parallelism to " + jetConfig.getCooperativeThreadCount());
}
Aggregations