use of com.facebook.presto.spi.ErrorType in project presto by prestodb.
the class PrestoSparkExecutionExceptionFactory method isRetryable.
private static boolean isRetryable(ExecutionFailureInfo executionFailureInfo) {
ErrorCode errorCode = executionFailureInfo.getErrorCode();
if (errorCode == null) {
return true;
}
ErrorType type = errorCode.getType();
return type == INTERNAL_ERROR || type == EXTERNAL;
}