diff --git a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java index 4cbcb431c..9a5a6c245 100644 --- a/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java +++ b/flink-doris-connector/src/main/java/org/apache/doris/flink/sink/writer/DorisStreamLoad.java @@ -42,6 +42,7 @@ import java.io.IOException; import java.io.Serializable; +import java.net.NoRouteToHostException; import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -281,6 +282,9 @@ public RespContent stopLoad() throws IOException { Preconditions.checkState(pendingLoadFuture != null); try { return handlePreCommitResponse(pendingLoadFuture.get()); + } catch (NoRouteToHostException nex){ + LOG.error("Failed to connect, cause ", nex); + throw new DorisRuntimeException("No Route to Host to " + hostPort + ", exception: " + nex); } catch (Exception e) { throw new DorisRuntimeException(e); }