in spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java [122:153]
public TScanOpenResult openScanner(TScanOpenParams openParams) throws ConnectedFailedException {
if (logger.isDebugEnabled()) {
TScanOpenParams logParams = new TScanOpenParams(openParams);
logParams.setPasswd("********");
logger.debug("OpenScanner to '{}', parameter is '{}'.", routing, logParams);
}
if (!isConnected) {
open();
}
TException ex = null;
for (int attempt = 0; attempt < retries; ++attempt) {
logger.debug("Attempt {} to openScanner {}.", attempt, routing);
try {
TScanOpenResult result = client.openScanner(openParams);
if (result == null) {
logger.warn("Open scanner result from {} is null.", routing);
continue;
}
if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {
logger.warn("The status of open scanner result from {} is '{}', error message is: {}.",
routing, result.getStatus().getStatusCode(), result.getStatus().getErrorMsgs());
continue;
}
return result;
} catch (TException e) {
logger.warn("Open scanner from {} failed.", routing, e);
ex = e;
}
}
logger.error(ErrorMessages.CONNECT_FAILED_MESSAGE, routing);
throw new ConnectedFailedException(routing.toString(), ex);
}