Refine search
@Override public void onFailure(Exception e) { logger.warn(() -> new ParameterizedMessage("failed to execute failure callback on [{}]", listener), e); } });
@Override public Cancellable scheduleWithFixedDelay(Runnable command, TimeValue interval, String executor) { return new ReschedulingRunnable(command, interval, executor, this, (e) -> { if (logger.isDebugEnabled()) { logger.debug(() -> new ParameterizedMessage("scheduled task [{}] was rejected on thread pool [{}]", command, executor), e); } }, (e) -> logger.warn(() -> new ParameterizedMessage("failed to run scheduled task [{}] on thread pool [{}]", command, executor), e)); }
private static long initializePid() { final String name = ManagementFactory.getRuntimeMXBean().getName(); try { return Long.parseLong(name.split("@")[0]); } catch (final NumberFormatException e) { LogManager.getLogger(JvmPid.class).debug(new ParameterizedMessage("failed parsing PID from [{}]", name), e); return -1; } }
@Override public void handleException(TransportException exp) { logger.warn(() -> new ParameterizedMessage("failed to send rejoin request to [{}]", otherMaster), exp); } });
@Override public void onFailure(Exception t) { logger.debug(() -> new ParameterizedMessage("failed to close indices [{}]", (Object) concreteIndices), t); listener.onFailure(t); } });
@Override public void onFailure(Exception e) { if (e instanceof ConnectTransportException || e instanceof AlreadyClosedException) { // can't connect to the node - this is more common path! logger.trace(() -> new ParameterizedMessage("[{}] failed to ping {}", pingingRound.id(), node), e); } else if (e instanceof RemoteTransportException) { // something went wrong on the other side logger.debug(() -> new ParameterizedMessage( "[{}] received a remote error as a response to ping {}", pingingRound.id(), node), e); } else { logger.warn(() -> new ParameterizedMessage("[{}] failed send ping to {}", pingingRound.id(), node), e); } }
@Override public void onFailure(Exception e) { // both errors and rejections are logged here. the service // will try again after `cluster.nodes.reconnect_interval` on all nodes but the current master. // On the master, node fault detection will remove these nodes from the cluster as their are not // connected. Note that it is very rare that we end up here on the master. logger.warn(() -> new ParameterizedMessage("failed to connect to {}", node), e); }
@Override public void onFailure(Exception t) { logger.debug(() -> new ParameterizedMessage("failed to delete indices [{}]", concreteIndices), t); listener.onFailure(t); } });
@Override public void onFailure(Exception e) { logger.warn(() -> new ParameterizedMessage("Failed to clear scroll [{}]", scrollId), e); onCompletion.run(); } });
@Override public void onFailure(Exception e) { if (channel.isOpen()) { logger.debug(() -> new ParameterizedMessage("[{}] failed to send transport ping", channel), e); failedPings.inc(); } else { logger.trace(() -> new ParameterizedMessage("[{}] failed to send transport ping (channel closed)", channel), e); } } });
/** * Exception handler for exceptions that are not associated with a specific channel. * * @param exception the exception */ protected void onNonChannelException(Exception exception) { logger.warn(new ParameterizedMessage("exception caught on transport layer [thread={}]", Thread.currentThread().getName()), exception); }
@Override public void onFailure(Exception e) { onDone(); if (e instanceof ConnectTransportException) { logger.debug(() -> new ParameterizedMessage("failed to connect to node [{}], ignoring...", nodeToPing), e); hostFailureListener.onNodeDisconnected(nodeToPing, e); } else { logger.info(() -> new ParameterizedMessage( "failed to get local cluster state info for {}, disconnecting...", nodeToPing), e); } }
private void logInvalidSetting( final String settingType, final Map.Entry<String, String> e, final IllegalArgumentException ex, final Logger logger) { logger.warn( (Supplier<?>) () -> new ParameterizedMessage("ignoring existing invalid {} setting: [{}] with value [{}]; archiving", settingType, e.getKey(), e.getValue()), ex); }
@Override public void onFailure(String source, Exception e) { logger.debug(() -> new ParameterizedMessage("failed to perform [{}]", source), e); super.onFailure(source, e); }
private List<String> readFileContents(Path path) { try (Stream<String> lines = Files.lines(path)) { return lines.filter(line -> line.startsWith("#") == false) // lines starting with `#` are comments .collect(Collectors.toList()); } catch (IOException e) { logger.warn(() -> new ParameterizedMessage("failed to read file [{}]", unicastHostsFilePath), e); return Collections.emptyList(); } }
@Override public void onFailure(Exception t) { logger.debug(() -> new ParameterizedMessage("failed to open indices [{}]", (Object) concreteIndices), t); listener.onFailure(t); } });
@Override public void onPreQueryPhase(SearchContext searchContext) { for (SearchOperationListener listener : listeners) { try { listener.onPreQueryPhase(searchContext); } catch (Exception e) { logger.warn(() -> new ParameterizedMessage("onPreQueryPhase listener [{}] failed", listener), e); } } }
@Override public void handleException(TransportException exp) { logger.debug(() -> new ParameterizedMessage("shards active request failed for {}", shardId), exp); if (awaitingResponses.decrementAndGet() == 0) { allNodesResponded(); } }
@Override public void onQueryPhase(SearchContext searchContext, long tookInNanos) { for (SearchOperationListener listener : listeners) { try { listener.onQueryPhase(searchContext, tookInNanos); } catch (Exception e) { logger.warn(() -> new ParameterizedMessage("onQueryPhase listener [{}] failed", listener), e); } } }
@Override public void handleException(TransportException exp) { try { channel.sendResponse(exp); } catch (IOException e) { logger.debug(() -> new ParameterizedMessage( "failed to send failure {}", extraInfoOnError == null ? "" : "(" + extraInfoOnError + ")"), e); } }