This is an automated email from the ASF dual-hosted git repository.

gabrywu pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 40a2181  [Fix] [Server] Fix the spell error and add log in SqlTask 
(#3243)
40a2181 is described below

commit 40a21816abc0b8d767dacacb674340c9fda09f9c
Author: zixi0825 <[email protected]>
AuthorDate: Fri Aug 7 13:58:14 2020 +0800

    [Fix] [Server] Fix the spell error and add log in SqlTask (#3243)
    
    * fix the spell and modify logger print format
---
 .../cache/impl/TaskInstanceCacheManagerImpl.java   |  2 +-
 .../impl/TaskExecutionContextCacheManagerImpl.java |  2 +-
 .../server/worker/task/sql/SqlTask.java            | 24 +++++++++++-----------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/cache/impl/TaskInstanceCacheManagerImpl.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/cache/impl/TaskInstanceCacheManagerImpl.java
index c149ac3..4d55490 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/cache/impl/TaskInstanceCacheManagerImpl.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/cache/impl/TaskInstanceCacheManagerImpl.java
@@ -36,7 +36,7 @@ import java.util.concurrent.ConcurrentHashMap;
 public class TaskInstanceCacheManagerImpl implements TaskInstanceCacheManager {
 
     /**
-     * taskInstance caceh
+     * taskInstance cache
      */
     private Map<Integer,TaskInstance> taskInstanceCache = new 
ConcurrentHashMap<>();
 
diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java
index 009332f..9c92fb2 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/cache/impl/TaskExecutionContextCacheManagerImpl.java
@@ -32,7 +32,7 @@ public class TaskExecutionContextCacheManagerImpl implements 
TaskExecutionContex
 
 
     /**
-     * taskInstance caceh
+     * taskInstance cache
      */
     private Map<Integer,TaskExecutionContext> taskExecutionContextCache = new 
ConcurrentHashMap<>();
 
diff --git 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java
 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java
index acc75d7..939426b 100644
--- 
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java
+++ 
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sql/SqlTask.java
@@ -147,8 +147,8 @@ public class SqlTask extends AbstractTask {
     }
 
     /**
-     *  ready to execute SQL and parameter entity Map
-     * @return
+     * ready to execute SQL and parameter entity Map
+     * @return SqlBinds
      */
     private SqlBinds getSqlAndSqlParamsMap(String sql) {
         Map<Integer,Property> sqlParamsMap =  new HashMap<>();
@@ -250,7 +250,7 @@ public class SqlTask extends AbstractTask {
      * result process
      *
      * @param resultSet resultSet
-     * @throws Exception
+     * @throws Exception Exception
      */
     private void resultProcess(ResultSet resultSet) throws Exception{
         ArrayNode resultJSONArray = JSONUtils.createArrayNode();
@@ -293,7 +293,7 @@ public class SqlTask extends AbstractTask {
     }
 
     /**
-     * post psql
+     * post sql
      *
      * @param connection connection
      * @param postStatementsBinds postStatementsBinds
@@ -329,7 +329,7 @@ public class SqlTask extends AbstractTask {
      * create connection
      *
      * @return connection
-     * @throws Exception
+     * @throws Exception Exception
      */
     private Connection createConnection() throws Exception{
         // if hive , load connection params if exists
@@ -367,7 +367,7 @@ public class SqlTask extends AbstractTask {
             try {
                 resultSet.close();
             } catch (SQLException e) {
-
+                logger.error("close result set error : {}",e.getMessage(),e);
             }
         }
 
@@ -375,7 +375,7 @@ public class SqlTask extends AbstractTask {
             try {
                 pstmt.close();
             } catch (SQLException e) {
-
+                logger.error("close prepared statement error : 
{}",e.getMessage(),e);
             }
         }
 
@@ -383,17 +383,17 @@ public class SqlTask extends AbstractTask {
             try {
                 connection.close();
             } catch (SQLException e) {
-
+                logger.error("close connection error : {}",e.getMessage(),e);
             }
         }
     }
 
     /**
      * preparedStatement bind
-     * @param connection
-     * @param sqlBinds
-     * @return
-     * @throws Exception
+     * @param connection connection
+     * @param sqlBinds  sqlBinds
+     * @return PreparedStatement
+     * @throws Exception Exception
      */
     private PreparedStatement prepareStatementAndBind(Connection connection, 
SqlBinds sqlBinds) throws Exception {
         // is the timeout set

Reply via email to