Refine search
private void waitMergeEnd(int mergedCount) { try { long timeoutMillis = Math.max(mergedCount * TIMEOUT_FACTOR, MINIMAL_TIMEOUT_MILLIS); if (!semaphore.tryAcquire(mergedCount, timeoutMillis, MILLISECONDS)) { logger.warning("Split-brain healing didn't finish within the timeout..."); } } catch (InterruptedException e) { logger.finest("Interrupted while waiting for split-brain healing..."); Thread.currentThread().interrupt(); } }
private void waitMergeEnd(int mergedCount) { try { long timeoutMillis = Math.max(mergedCount * TIMEOUT_FACTOR, MINIMAL_TIMEOUT_MILLIS); if (!semaphore.tryAcquire(mergedCount, timeoutMillis, MILLISECONDS)) { logger.warning("Split-brain healing didn't finish within the timeout..."); } } catch (InterruptedException e) { logger.finest("Interrupted while waiting for split-brain healing..."); Thread.currentThread().interrupt(); } }
protected void handleExceptionWhileProcessingMetadata(Member member, Exception e) { if (e instanceof IllegalStateException) { // log at finest when // HazelcastInstanceNotActive, HazelcastClientNotActive or HazelcastClientOffline exception logger.finest(e); } else if (logger.isWarningEnabled()) { logger.warning(format("Can't fetch or extract invalidation meta-data of %s", member), e); } }
private static void logFailureToFindUnsafeDueTo(final Throwable reason) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable", reason); } else { LOGGER.warning("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable"); } } }
private static void logFailureToFindUnsafeDueTo(final Throwable reason) { if (LOGGER.isFinestEnabled()) { LOGGER.finest("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable", reason); } else { LOGGER.warning("Unable to get an instance of Unsafe. Unsafe-based operations will be unavailable"); } } }
protected void handleExceptionWhileProcessingMetadata(Member member, Exception e) { if (e instanceof IllegalStateException) { // log at finest when // HazelcastInstanceNotActive, HazelcastClientNotActive or HazelcastClientOffline exception logger.finest(e); } else if (logger.isWarningEnabled()) { logger.warning(format("Can't fetch or extract invalidation meta-data of %s", member), e); } }
private boolean isEnabled(NioThread[] inputThreads, NioThread[] outputThreads) { if (balancerIntervalSeconds <= 0) { logger.warning("I/O Balancer is disabled as the '" + IO_BALANCER_INTERVAL_SECONDS + "' property is set to " + balancerIntervalSeconds + ". Set the property to a value larger than 0 to enable the I/O Balancer."); return false; } if (inputThreads.length == 1 && outputThreads.length == 1) { logger.finest("I/O Balancer is disabled as there is only a single a pair of I/O threads. Use the '" + IO_THREAD_COUNT + "' property to increase number of I/O Threads."); return false; } if (logger.isFinestEnabled()) { logger.finest("I/O Balancer is enabled. Scanning every " + balancerIntervalSeconds + " seconds for imbalances."); } return true; }
private boolean isEnabled(NioThread[] inputThreads, NioThread[] outputThreads) { if (balancerIntervalSeconds <= 0) { logger.warning("I/O Balancer is disabled as the '" + IO_BALANCER_INTERVAL_SECONDS + "' property is set to " + balancerIntervalSeconds + ". Set the property to a value larger than 0 to enable the I/O Balancer."); return false; } if (inputThreads.length == 1 && outputThreads.length == 1) { logger.finest("I/O Balancer is disabled as there is only a single a pair of I/O threads. Use the '" + IO_THREAD_COUNT + "' property to increase number of I/O Threads."); return false; } if (logger.isFinestEnabled()) { logger.finest("I/O Balancer is enabled. Scanning every " + balancerIntervalSeconds + " seconds for imbalances."); } return true; }
private MigrationStrategy createMigrationStrategy() { if (Boolean.getBoolean(PROP_MONKEY_BALANCER)) { logger.warning("Using Monkey IO Balancer Strategy. This is for stress tests only. Do not user in production! " + "Disable by not setting the property '" + PROP_MONKEY_BALANCER + "' to true."); return new MonkeyMigrationStrategy(); } else { logger.finest("Using normal IO Balancer Strategy."); return new LoadMigrationStrategy(); } }
private void awaitCompletion() { for (Map.Entry<Member, Future> responseEntry : futures.entrySet()) { try { Future future = responseEntry.getValue(); results.put(responseEntry.getKey(), serializationService.toObject(future.get())); } catch (Throwable t) { if (logger.isFinestEnabled()) { logger.finest(t); } else { logger.warning(t.getMessage()); } results.put(responseEntry.getKey(), t); } } }
private void awaitCompletion() { for (Map.Entry<Member, Future> responseEntry : futures.entrySet()) { try { Future future = responseEntry.getValue(); results.put(responseEntry.getKey(), serializationService.toObject(future.get())); } catch (Throwable t) { if (logger.isFinestEnabled()) { logger.finest(t); } else { logger.warning(t.getMessage()); } results.put(responseEntry.getKey(), t); } } }
private MigrationStrategy createMigrationStrategy() { if (Boolean.getBoolean(PROP_MONKEY_BALANCER)) { logger.warning("Using Monkey IO Balancer Strategy. This is for stress tests only. Do not user in production! " + "Disable by not setting the property '" + PROP_MONKEY_BALANCER + "' to true."); return new MonkeyMigrationStrategy(); } else { logger.finest("Using normal IO Balancer Strategy."); return new LoadMigrationStrategy(); } }
private ClassLoader loadScriptEngineFactoryClassLoader(String factoryName) { // We do not really need the class, but we need the classloader try { return ClassLoaderUtil.tryLoadClass(factoryName).getClassLoader(); } catch (ClassNotFoundException cnfe) { // may fail if script implementation is not in environment logger.warning("Found ScriptEngineFactory candidate for " + factoryName + ", but cannot load class! -> " + cnfe); if (logger.isFinestEnabled()) { logger.finest(cnfe); } return null; } }
private ClassLoader loadScriptEngineFactoryClassLoader(String factoryName) { // We do not really need the class, but we need the classloader try { return ClassLoaderUtil.tryLoadClass(factoryName).getClassLoader(); } catch (ClassNotFoundException cnfe) { // may fail if script implementation is not in environment logger.warning("Found ScriptEngineFactory candidate for " + factoryName + ", but cannot load class! -> " + cnfe); if (logger.isFinestEnabled()) { logger.finest(cnfe); } return null; } }
private void awaitCompletion() { NodeEngineImpl nodeEngine = operationService.nodeEngine; for (Map.Entry<Address, Future> response : futures.entrySet()) { try { Future future = response.getValue(); PartitionResponse result = nodeEngine.toObject(future.get()); result.addResults(partitionResults); } catch (Throwable t) { if (operationService.logger.isFinestEnabled()) { operationService.logger.finest(t); } else { operationService.logger.warning(t.getMessage()); } List<Integer> partitions = memberPartitions.get(response.getKey()); for (Integer partition : partitions) { partitionResults.put(partition, t); } } } }
/** * Synchronously makes initial population of partition UUIDs & sequences. * <p> * This initialization is done for every data structure with a Near Cache. */ private void initRepairingHandler(RepairingHandler handler) { logger.finest("Initializing repairing handler"); boolean initialized = false; try { invalidationMetaDataFetcher.init(handler); initialized = true; } catch (Exception e) { logger.warning(e); } finally { if (!initialized) { initRepairingHandlerAsync(handler); } } }