You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/01 03:00:13 UTC

[shardingsphere-elasticjob-lite] branch master updated: db2 sql commit (#875)

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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git


The following commit(s) were added to refs/heads/master by this push:
     new 93ae6d7  db2 sql commit (#875)
93ae6d7 is described below

commit 93ae6d72037d9059c9e39fbc2e8d391b9fbd3c0d
Author: dhc575757 <dh...@126.com>
AuthorDate: Wed Jul 1 11:00:06 2020 +0800

    db2 sql commit (#875)
    
    Co-authored-by: denghanchao <de...@zto.com>
---
 .../src/main/resources/META-INF/sql/db2.properties | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/elastic-job-lite-tracing/elastic-job-lite-tracing-rdb/src/main/resources/META-INF/sql/db2.properties b/elastic-job-lite-tracing/elastic-job-lite-tracing-rdb/src/main/resources/META-INF/sql/db2.properties
new file mode 100644
index 0000000..0769097
--- /dev/null
+++ b/elastic-job-lite-tracing/elastic-job-lite-tracing-rdb/src/main/resources/META-INF/sql/db2.properties
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+JOB_EXECUTION_LOG.TABLE.CREATE=CREATE TABLE JOB_EXECUTION_LOG (id VARCHAR(40) NOT NULL, job_name VARCHAR(100) NOT NULL, task_id VARCHAR(255) NOT NULL, hostname VARCHAR(255) NOT NULL, ip VARCHAR(50) NOT NULL, sharding_item INT NOT NULL, execution_source VARCHAR(20) NOT NULL, failure_cause VARCHAR(4000) NULL, is_success INT NOT NULL, start_time TIMESTAMP NULL, complete_time TIMESTAMP NULL, PRIMARY KEY (id))
+
+JOB_EXECUTION_LOG.INSERT=INSERT INTO JOB_EXECUTION_LOG (id, job_name, task_id, hostname, ip, sharding_item, execution_source, is_success, start_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
+JOB_EXECUTION_LOG.INSERT_COMPLETE=INSERT INTO JOB_EXECUTION_LOG (id, job_name, task_id, hostname, ip, sharding_item, execution_source, is_success, start_time, complete_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+JOB_EXECUTION_LOG.INSERT_FAILURE=INSERT INTO JOB_EXECUTION_LOG (id, job_name, task_id, hostname, ip, sharding_item, execution_source, failure_cause, is_success, start_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+JOB_EXECUTION_LOG.UPDATE=UPDATE JOB_EXECUTION_LOG SET is_success = ?, complete_time = ? WHERE id = ?
+JOB_EXECUTION_LOG.UPDATE_FAILURE=UPDATE JOB_EXECUTION_LOG SET is_success = ?, complete_time = ?, failure_cause = ? WHERE id = ?
+
+JOB_STATUS_TRACE_LOG.TABLE.CREATE=CREATE TABLE JOB_STATUS_TRACE_LOG (id VARCHAR(40) NOT NULL, job_name VARCHAR(100) NOT NULL, original_task_id VARCHAR(255) NOT NULL, task_id VARCHAR(255) NOT NULL, slave_id VARCHAR(50) NOT NULL, source VARCHAR(50) NOT NULL, execution_type VARCHAR(20) NOT NULL, sharding_item VARCHAR(100) NOT NULL, state VARCHAR(20) NOT NULL, message VARCHAR(4000) NULL, creation_time TIMESTAMP NULL, PRIMARY KEY (id))
+TASK_ID_STATE_INDEX.INDEX.CREATE=CREATE INDEX TASK_ID_STATE_INDEX ON JOB_STATUS_TRACE_LOG (task_id(128), state)
+
+JOB_STATUS_TRACE_LOG.INSERT=INSERT INTO JOB_STATUS_TRACE_LOG (id, job_name, original_task_id, task_id, slave_id, source, execution_type, sharding_item,  state, message, creation_time) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+JOB_STATUS_TRACE_LOG.SELECT=SELECT * FROM JOB_STATUS_TRACE_LOG WHERE task_id=?
+JOB_STATUS_TRACE_LOG.SELECT_ORIGINAL_TASK_ID=SELECT * FROM (SELECT ROWNUMBER() OVER() AS ROW, A.* FROM JOB_STATUS_TRACE_LOG  A WHERE A.TASK_ID='4' AND A.STATE='TASK_STAGING') AS B WHERE B.ROW=1