fengjian1129 commented on code in PR #11598:
URL: 
https://github.com/apache/dolphinscheduler/pull/11598#discussion_r1065675410


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -365,13 +379,31 @@ private String executeUpdate(Connection connection, 
List<SqlBinds> statementsBin
         int result = 0;
         for (SqlBinds sqlBind : statementsBinds) {
             try (PreparedStatement statement = 
prepareStatementAndBind(connection, sqlBind)) {
+
+                sqlLogListener(statement);
+
                 result = statement.executeUpdate();
                 logger.info("{} statement execute update result: {}, for sql: 
{}", handlerType, result, sqlBind.getSql());
             }
         }
         return String.valueOf(result);
     }
 
+    /**
+     * sql log listener
+     *
+     * @param statement statement
+     * @throws SQLException sqlException
+     */
+    private void sqlLogListener(PreparedStatement statement) throws 
SQLException {
+        if (DbType.HIVE.name().equals(sqlParameters.getType())) {
+            logger.info("The current sql task type is HIVE, will start a demon 
thread to resolve the appIds");

Review Comment:
   ok, I will modify it according to your suggestions. Can you help me merge 
the code after modification



##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java:
##########
@@ -365,13 +379,31 @@ private String executeUpdate(Connection connection, 
List<SqlBinds> statementsBin
         int result = 0;
         for (SqlBinds sqlBind : statementsBinds) {
             try (PreparedStatement statement = 
prepareStatementAndBind(connection, sqlBind)) {
+
+                sqlLogListener(statement);
+
                 result = statement.executeUpdate();
                 logger.info("{} statement execute update result: {}, for sql: 
{}", handlerType, result, sqlBind.getSql());
             }
         }
         return String.valueOf(result);
     }
 
+    /**
+     * sql log listener
+     *
+     * @param statement statement
+     * @throws SQLException sqlException
+     */
+    private void sqlLogListener(PreparedStatement statement) throws 
SQLException {
+        if (DbType.HIVE.name().equals(sqlParameters.getType())) {
+            logger.info("The current sql task type is HIVE, will start a demon 
thread to resolve the appIds");

Review Comment:
   ok, I will modify it according to your suggestions. Can you help me merge 
the code after modification



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to