Skip to content

Commit

Permalink
[Fix] [Server] Fix the spell error and add log in SqlTask (#3243)
Browse files Browse the repository at this point in the history
* fix the spell and modify logger print format
  • Loading branch information
zixi0825 authored Aug 7, 2020
1 parent f784ce5 commit 40a2181
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class TaskInstanceCacheManagerImpl implements TaskInstanceCacheManager {

/**
* taskInstance caceh
* taskInstance cache
*/
private Map<Integer,TaskInstance> taskInstanceCache = new ConcurrentHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class TaskExecutionContextCacheManagerImpl implements TaskExecutionContex


/**
* taskInstance caceh
* taskInstance cache
*/
private Map<Integer,TaskExecutionContext> taskExecutionContextCache = new ConcurrentHashMap<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ public void handle() throws Exception {
}

/**
* 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<>();
Expand Down Expand Up @@ -250,7 +250,7 @@ public void executeFuncAndSql(SqlBinds mainSqlBinds,
* result process
*
* @param resultSet resultSet
* @throws Exception
* @throws Exception Exception
*/
private void resultProcess(ResultSet resultSet) throws Exception{
ArrayNode resultJSONArray = JSONUtils.createArrayNode();
Expand Down Expand Up @@ -293,7 +293,7 @@ private void preSql(Connection connection,
}

/**
* post psql
* post sql
*
* @param connection connection
* @param postStatementsBinds postStatementsBinds
Expand Down Expand Up @@ -329,7 +329,7 @@ private void createTempFunction(Connection connection,
* create connection
*
* @return connection
* @throws Exception
* @throws Exception Exception
*/
private Connection createConnection() throws Exception{
// if hive , load connection params if exists
Expand Down Expand Up @@ -367,33 +367,33 @@ private void close(ResultSet resultSet,
try {
resultSet.close();
} catch (SQLException e) {

logger.error("close result set error : {}",e.getMessage(),e);
}
}

if (pstmt != null){
try {
pstmt.close();
} catch (SQLException e) {

logger.error("close prepared statement error : {}",e.getMessage(),e);
}
}

if (connection != null){
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
Expand Down

0 comments on commit 40a2181

Please sign in to comment.