use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class ClassDataProviderTest method createClassDataProvider.
private ClassDataProvider createClassDataProvider(UserCodeDeploymentConfig.ProviderMode providerMode, String className, ClassSource classSource, ClassLoader parent) {
ILogger logger = mock(ILogger.class);
ConcurrentMap<String, ClassSource> classSourceMap = new ConcurrentHashMap<String, ClassSource>();
classSourceMap.put(className, classSource);
return new ClassDataProvider(providerMode, parent, classSourceMap, logger);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method createAddressProviders.
private Collection<AddressProvider> createAddressProviders(AddressProvider externalAddressProvider) {
ClientNetworkConfig networkConfig = getClientConfig().getNetworkConfig();
final ClientAwsConfig awsConfig = networkConfig.getAwsConfig();
Collection<AddressProvider> addressProviders = new LinkedList<AddressProvider>();
addressProviders.add(new DefaultAddressProvider(networkConfig));
if (externalAddressProvider != null) {
addressProviders.add(externalAddressProvider);
}
if (discoveryService != null) {
addressProviders.add(new DiscoveryAddressProvider(discoveryService, loggingService));
}
if (awsConfig != null && awsConfig.isEnabled()) {
try {
addressProviders.add(new AwsAddressProvider(awsConfig, loggingService));
} catch (NoClassDefFoundError e) {
ILogger logger = loggingService.getLogger(HazelcastClient.class);
logger.warning("hazelcast-aws.jar might be missing!");
throw e;
}
}
return addressProviders;
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method initDiagnostics.
private Diagnostics initDiagnostics(ClientConfig config) {
String name = "diagnostics-client-" + id + "-" + currentTimeMillis();
ILogger logger = loggingService.getLogger(Diagnostics.class);
HazelcastThreadGroup hzThreadGroup = new HazelcastThreadGroup(getName(), logger, config.getClassLoader());
return new Diagnostics(name, logger, hzThreadGroup, properties);
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class HazelcastClientInstanceImpl method initMetricsRegistry.
private MetricsRegistryImpl initMetricsRegistry() {
ProbeLevel probeLevel = properties.getEnum(Diagnostics.METRICS_LEVEL, ProbeLevel.class);
ILogger logger = loggingService.getLogger(MetricsRegistryImpl.class);
MetricsRegistryImpl metricsRegistry = new MetricsRegistryImpl(logger, probeLevel);
RuntimeMetricSet.register(metricsRegistry);
GarbageCollectionMetricSet.register(metricsRegistry);
OperatingSystemMetricSet.register(metricsRegistry);
ThreadMetricSet.register(metricsRegistry);
ClassLoadingMetricSet.register(metricsRegistry);
FileMetricSet.register(metricsRegistry);
return metricsRegistry;
}
use of com.hazelcast.logging.ILogger in project hazelcast by hazelcast.
the class JobSupervisor method asyncCancelRemoteOperations.
private void asyncCancelRemoteOperations(final Set<Address> addresses) {
final NodeEngine nodeEngine = mapReduceService.getNodeEngine();
TaskScheduler taskScheduler = nodeEngine.getExecutionService().getGlobalTaskScheduler();
taskScheduler.execute(new Runnable() {
@Override
public void run() {
String name = getConfiguration().getName();
String jobId = getConfiguration().getJobId();
for (Address address : addresses) {
try {
CancelJobSupervisorOperation operation = new CancelJobSupervisorOperation(name, jobId);
mapReduceService.processRequest(address, operation);
} catch (Exception ignore) {
// We can ignore this exception since we just want to cancel the job
// and the member may be crashed or unreachable in some way
ILogger logger = nodeEngine.getLogger(JobSupervisor.class);
logger.finest("Remote node may already be down", ignore);
}
}
}
});
}
Aggregations