public static void logRejectionWarning(RejectedExecutionException e) { logger.warn("The limit of pending tasks for the executor is reached. " + "This could be due to a unreachable service such as elasticsearch or due to a spike in incoming requests. " + "Consider increasing the default capacity limit with the configuration key '" + CorePlugin.POOLS_QUEUE_CAPACITY_LIMIT_KEY + "'\n" + e.getMessage()); }
/** * Runs listener notification is separate thread. * * @param evts Event list. */ private void notifyEvents(final Iterable<TopologyEvent> evts) { try { exec.execute(new Runnable() { @Override public void run() { for (TopologyEvent evt : evts) { if (evt.added()) { for (GridClientTopologyListener lsnr : topLsnrs) lsnr.onNodeAdded(evt.node()); } else { for (GridClientTopologyListener lsnr : topLsnrs) lsnr.onNodeRemoved(evt.node()); } } } }); } catch (RejectedExecutionException e) { log.warning("Unable to notify event listeners on topology change since client is shutting down: " + e.getMessage()); } }
@Override @SuppressWarnings("unchecked") protected void channelRead0(ChannelHandlerContext ctx, Object message) throws Exception { try { connection.dispatch((M) message); } catch (RejectedExecutionException e) { log.warn("Unable to dispatch message due to {}", e.getMessage()); } }
/** * Starts asynchronous process for retrieving latest version data. * * @param log Logger. * @param first First checking. */ void checkForNewVersion(IgniteLogger log, boolean first) { assert log != null; log = log.getLogger(getClass()); try { cmd.set(new UpdateChecker(log, first)); } catch (RejectedExecutionException e) { U.error(log, "Failed to schedule a thread due to execution rejection (safely ignoring): " + e.getMessage()); } }
/** * Transfer all the queues of the specified to this region server. First it tries to grab a lock * and if it works it will move the old queues and finally will delete the old queues. * <p> * It creates one old source for any type of source of the old rs. */ private void transferQueues(ServerName deadRS) { if (server.getServerName().equals(deadRS)) { // it's just us, give up return; } NodeFailoverWorker transfer = new NodeFailoverWorker(deadRS); try { this.executor.execute(transfer); } catch (RejectedExecutionException ex) { CompatibilitySingletonFactory.getInstance(MetricsReplicationSourceFactory.class) .getGlobalSource().incrFailedRecoveryQueue(); LOG.info("Cancelling the transfer of " + deadRS + " because of " + ex.getMessage()); } }
className, e.getMessage()); } else { throw e;
LoggerUtils.warnAndDebugDetails(logger, "task submit is failed. Reason: {}", e.getMessage(), e); return new ShutdownAndRemovePeerProcessor(myPeerUID, myContext).processAndGetNext(socketChannel);
torrent.addConnectedPeer(sharingPeer); } catch (RejectedExecutionException e) { LoggerUtils.warnAndDebugDetails(logger, "task 'onConnectionEstablished' submit is failed. Reason: {}", e.getMessage(), e); return new ShutdownAndRemovePeerProcessor(peerUID, myContext).processAndGetNext(socketChannel);
public void deleteProblemReport(Table.ID table, ProblemType pType, String resource) { final ProblemReport pr = new ProblemReport(table, pType, resource, null); Runnable r = new Runnable() { @Override public void run() { try { if (isMeta(pr.getTableId())) { // file report in zookeeper pr.removeFromZooKeeper(context); } else { // file report in metadata table pr.removeFromMetadataTable(context); } } catch (Exception e) { log.error("Failed to delete problem report {} {} {}", pr.getTableId(), pr.getProblemType(), pr.getResource(), e); } } }; try { reportExecutor.execute(new LoggingRunnable(log, r)); } catch (RejectedExecutionException ree) { log.error("Failed to delete problem report {} {} {} {}", pr.getTableId(), pr.getProblemType(), pr.getResource(), ree.getMessage()); } }
} catch (RejectedExecutionException ree) { log.error("Failed to report problem {} {} {} {}", pr.getTableId(), pr.getProblemType(), pr.getResource(), ree.getMessage());
@Override protected void channelRead0(ChannelHandlerContext ctx, InternalMessage message) throws Exception { try { dispatchLocally(message); } catch (RejectedExecutionException e) { log.warn("Unable to dispatch message due to {}", e.getMessage()); } }
public void onRead(final PipedDeserializer deserializer) { try { this.threadPoolTaskExecutor.execute(deserializer); } catch (final RejectedExecutionException e) { this.log.error("A message deserialization task has been rejected (" + e.getMessage() + ")"); } }
private void callAction(final Action a, final Signal signal) { try { final CallableAction task = new CallableAction(a, signal); actionPool.submit(task); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.getMessage()); } }
private void callAction(final Action a, final Signal signal) { try { final CallableAction task = new CallableAction(a, signal); actionPool.submit(task); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.getMessage()); } }
@Override @SuppressWarnings("unchecked") protected void channelRead0(ChannelHandlerContext ctx, Object message) throws Exception { try { connection.dispatch((M) message); } catch (RejectedExecutionException e) { log.warn("Unable to dispatch message due to {}", e.getMessage()); } }
private void callMessageAction(final Action a, final MessageSignal signal) { try { final CallableAction task = new CallableAction(a, signal); messageActionPool.submit(task); } catch (RejectedExecutionException e) { logger.log(Level.WARNING, e.getMessage()); } }
private void scheduleNextRun() { try { scheduler.schedule(this, 1, SECONDS); } catch (RejectedExecutionException e) { if (logger.isFinestEnabled()) { logger.finest(e.getMessage()); } } }
private void scheduleNextRun() { try { scheduler.schedule(this, 1, SECONDS); } catch (RejectedExecutionException e) { if (logger.isFinestEnabled()) { logger.finest(e.getMessage()); } } }
private void completeWhenRetryRejected(RejectedExecutionException e) { if (context.logger.isFinestEnabled()) { context.logger.finest(e); } complete(new HazelcastInstanceNotActiveException(e.getMessage())); }
private void completeWhenRetryRejected(RejectedExecutionException e) { if (context.logger.isFinestEnabled()) { context.logger.finest(e); } complete(new HazelcastInstanceNotActiveException(e.getMessage())); }