@Override public boolean shouldRetryOnDifferentHost(Exception ex, int maxTriesSameHost, int numberOfAttempts) { return isFastFailoverException(ex) || numberOfAttempts >= maxTriesSameHost; } }
@Override public boolean shouldBackoff(Exception ex) { return !isFastFailoverException(ex); }
static boolean isFastFailoverException(Throwable ex) { return ex != null // underlying cassandra table does not exist. The table might exist on other cassandra nodes. && (ex instanceof InvalidRequestException || isFastFailoverException(ex.getCause())); }
@Override public boolean shouldRetryOnDifferentHost(Exception ex, int maxTriesSameHost, int numberOfAttempts) { return isFastFailoverException(ex) || isIndicativeOfCassandraLoad(ex) || numberOfAttempts >= maxTriesSameHost; } }
@VisibleForTesting static boolean isRetryable(Exception ex) { return isConnectionException(ex) || isTransientException(ex) || isIndicativeOfCassandraLoad(ex) || isFastFailoverException(ex); }
@Override public boolean shouldRetryOnDifferentHost(Exception ex, int maxTriesSameHost, int numberOfAttempts) { return isFastFailoverException(ex) || numberOfAttempts >= maxTriesSameHost; } }
@Override public boolean shouldBackoff(Exception ex) { return !isFastFailoverException(ex); }
static boolean isFastFailoverException(Throwable ex) { return ex != null // underlying cassandra table does not exist. The table might exist on other cassandra nodes. && (ex instanceof InvalidRequestException || isFastFailoverException(ex.getCause())); }
@Override public boolean shouldRetryOnDifferentHost(Exception ex, int maxTriesSameHost, int numberOfAttempts) { return isFastFailoverException(ex) || isIndicativeOfCassandraLoad(ex) || numberOfAttempts >= maxTriesSameHost; } }
@VisibleForTesting static boolean isRetryable(Exception ex) { return isConnectionException(ex) || isTransientException(ex) || isIndicativeOfCassandraLoad(ex) || isFastFailoverException(ex); }