This is an automated email from the ASF dual-hosted git repository. diwu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris-spark-connector.git
The following commit(s) were added to refs/heads/master by this push: new a364450 [improvement] optimize log and exception message (#152) a364450 is described below commit a364450da7bdfdd357f4323be35989003d0db15d Author: gnehil <adamlee...@gmail.com> AuthorDate: Thu Nov 2 10:23:22 2023 +0800 [improvement] optimize log and exception message (#152) --- .../main/java/org/apache/doris/spark/load/DorisStreamLoad.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java b/spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java index 3d5bf36..2f365a8 100644 --- a/spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java +++ b/spark-doris-connector/src/main/java/org/apache/doris/spark/load/DorisStreamLoad.java @@ -237,14 +237,16 @@ public class DorisStreamLoad implements Serializable { } if (loadResponse.status != HttpStatus.SC_OK) { - LOG.info("Stream load Response HTTP Status Error:{}", loadResponse); - throw new StreamLoadException("stream load error"); + LOG.error("Stream load http status is not OK, status: {}, response: {}", loadResponse.status, loadResponse); + throw new StreamLoadException( + String.format("stream load error, http status:%d, response:%s", loadResponse.status, loadResponse)); } else { try { RespContent respContent = MAPPER.readValue(loadResponse.respContent, RespContent.class); if (!DORIS_SUCCESS_STATUS.contains(respContent.getStatus())) { - LOG.error("Stream load Response RES STATUS Error:{}", loadResponse); - throw new StreamLoadException("stream load error"); + LOG.error("Stream load status is not success, status:{}, response:{}", respContent.getStatus(), loadResponse); + throw new StreamLoadException( + String.format("stream load error, load status:%s, response:%s", respContent.getStatus(), loadResponse)); } LOG.info("Stream load Response:{}", loadResponse); return respContent.getTxnId(); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org