This commit is contained in:
2023-04-16 21:38:32 +08:00
parent a0849e40ef
commit 0b6c876a0f
59 changed files with 1026 additions and 189 deletions

View File

@@ -44,7 +44,7 @@ function Usage {
}
function InitPipe {
Print Init named pipe ...
Print Initing named pipe ...
rm -rf pool.pipe
mkfifo pool.pipe
exec 1022<> pool.pipe
@@ -55,7 +55,7 @@ function InitPipe {
function StartJob {
local job="$1"
local code=0
Print Start job $job with timeout $TIMEOUT ...
Print Starting job $job with timeout $TIMEOUT ...
timeout ${TIMEOUT} java \
-server \
-Xms1g \
@@ -89,14 +89,14 @@ function StartJob {
}
function StartProc {
Print Start datax with max $MAX_PROCS parallel jobs ...
Print Starting datax with max $MAX_PROCS parallel jobs ...
local job=
for job in $(ls job/ | grep '\.json$'); do
read -n 1 -u 1022
StartJob "${job%.json}" &
done
wait
[ -n "$job" ] || Print Not found any job!
[ -n "$job" ] && Print All jobs finished. || Print Not found any job!
}
function Main {

View File

@@ -9,7 +9,8 @@ export LANG=en_US.UTF-8
[ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)"
ROOT_DIR="$(cd $(dirname $0) && pwd)"
IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:latest"
#IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:latest"
IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:202303"
if [ -t 0 ]; then
function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; }
@@ -46,8 +47,8 @@ function Update {
rm -rf $(ls | grep -v ccmd || true)
tar zxf /release/RUNTIME/datax.tar.gz -C .
rm -rf datax/tmp datax/job/*.json
rm -f datax/plugin/writer/mysqlwriter/libs/mysql-connector-java-5.1.34.jar
rm -f datax/plugin/reader/mysqlreader/libs/mysql-connector-java-5.1.34.jar
rm -f datax/plugin/writer/mysqlwriter/libs/mysql-connector-java-5.*.jar
rm -f datax/plugin/reader/mysqlreader/libs/mysql-connector-java-5.*.jar
cp /release/RUNTIME/mysql-connector-java-8.0.27.jar datax/plugin/reader/mysqlreader/libs/
cp /release/RUNTIME/mysql-connector-java-8.0.27.jar datax/plugin/writer/mysqlwriter/libs/
find datax/ -type f | xargs chmod 0644