use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class AbstractExecutorServiceCancelMessageTask method logException.
private void logException(Exception e) {
ILogger logger = nodeEngine.getLogger(AbstractExecutorServiceCancelMessageTask.class);
logger.warning(e);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method initDiscoveryService.
private DiscoveryService initDiscoveryService(ClientConfig config) {
// and strategies are resolved but the AddressProvider is never registered
if (!properties.getBoolean(ClientProperty.DISCOVERY_SPI_ENABLED)) {
return null;
}
ILogger logger = loggingService.getLogger(DiscoveryService.class);
ClientNetworkConfig networkConfig = config.getNetworkConfig();
DiscoveryConfig discoveryConfig = networkConfig.getDiscoveryConfig().getAsReadOnly();
DiscoveryServiceProvider factory = discoveryConfig.getDiscoveryServiceProvider();
if (factory == null) {
factory = new DefaultDiscoveryServiceProvider();
}
DiscoveryServiceSettings settings = new DiscoveryServiceSettings().setConfigClassLoader(config.getClassLoader()).setLogger(logger).setDiscoveryMode(DiscoveryMode.Client).setDiscoveryConfig(discoveryConfig);
DiscoveryService discoveryService = factory.newDiscoveryService(settings);
discoveryService.start();
return discoveryService;
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class DefaultClientConnectionManagerFactory method createConnectionManager.
@Override
public ClientConnectionManager createConnectionManager(ClientConfig config, HazelcastClientInstanceImpl client, DiscoveryService discoveryService) {
LoggingService loggingService = client.getLoggingService();
ILogger logger = loggingService.getLogger(HazelcastClient.class);
ClientAwsConfig awsConfig = config.getNetworkConfig().getAwsConfig();
AddressTranslator addressTranslator;
if (awsConfig != null && awsConfig.isEnabled()) {
try {
addressTranslator = new AwsAddressTranslator(awsConfig, loggingService);
} catch (NoClassDefFoundError e) {
logger.warning("hazelcast-aws.jar might be missing!");
throw e;
}
} else if (discoveryService != null) {
addressTranslator = new DiscoveryAddressTranslator(discoveryService, client.getProperties().getBoolean(ClientProperty.DISCOVERY_SPI_PUBLIC_IP_ENABLED));
} else {
addressTranslator = new DefaultAddressTranslator();
}
return new ClientConnectionManagerImpl(client, addressTranslator);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class MapReduceUtil method notifyRemoteException.
public static void notifyRemoteException(JobSupervisor supervisor, Throwable throwable) {
MapReduceService mapReduceService = supervisor.getMapReduceService();
NodeEngine nodeEngine = mapReduceService.getNodeEngine();
try {
Address jobOwner = supervisor.getJobOwner();
if (supervisor.isOwnerNode()) {
supervisor.notifyRemoteException(jobOwner, throwable);
} else {
String name = supervisor.getConfiguration().getName();
String jobId = supervisor.getConfiguration().getJobId();
NotifyRemoteExceptionOperation operation = new NotifyRemoteExceptionOperation(name, jobId, throwable);
OperationService os = nodeEngine.getOperationService();
os.send(operation, jobOwner);
}
} catch (Exception e) {
ILogger logger = nodeEngine.getLogger(MapReduceUtil.class);
logger.warning("Could not notify remote map-reduce owner", e);
}
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class ClientContext method newRepairingTask.
private RepairingTask newRepairingTask(String serviceName) {
MetaDataFetcher metaDataFetcher = newMetaDataFetcher(serviceName);
ILogger logger = loggingService.getLogger(RepairingTask.class);
return new RepairingTask(metaDataFetcher, executionService, minimalPartitionService, properties, localUuid, logger);
}
Aggregations