in spark-doris-connector/src/main/java/org/apache/doris/spark/backend/BackendClient.java [201:231]
public void closeScanner(TScanCloseParams closeParams) {
logger.debug("CloseScanner to '{}', parameter is '{}'.", routing, closeParams);
if (!isConnected) {
try {
open();
} catch (ConnectedFailedException e) {
logger.warn("Cannot connect to Doris BE {} when close scanner.", routing);
return;
}
}
for (int attempt = 0; attempt < retries; ++attempt) {
logger.debug("Attempt {} to closeScanner {}.", attempt, routing);
try {
TScanCloseResult result = client.closeScanner(closeParams);
if (result == null) {
logger.warn("CloseScanner result from {} is null.", routing);
continue;
}
if (!TStatusCode.OK.equals(result.getStatus().getStatusCode())) {
logger.warn("The status of get next result from {} is '{}', error message is: {}.",
routing, result.getStatus().getStatusCode(), result.getStatus().getErrorMsgs());
continue;
}
break;
} catch (TException e) {
logger.warn("Close scanner from {} failed.", routing, e);
}
}
logger.info("CloseScanner to Doris BE '{}' success.", routing);
close();
}