diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/service_ddl.json b/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/service_ddl.json index 6df5c8ff..b83afcdb 100644 --- a/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/service_ddl.json +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/service_ddl.json @@ -9,6 +9,33 @@ "decompressPackageName": "flink-1.17.2", "runAs":"root", "roles": [ + { + "name": "FlinkHistoryServer", + "label": "FlinkHistoryServer", + "roleType": "master", + "cardinality": "1", + "startRunner": { + "timeout": "60", + "program": "bin/historyserver.sh", + "args": [ + "start" + ] + }, + "stopRunner": { + "timeout": "600", + "program": "bin/historyserver.sh", + "args": [ + "stop" + ] + }, + "statusRunner": { + "timeout": "600", + "program": "bin/status-history-server.sh", + "args": [ + "status","historyserver" + ] + } + }, { "name": "FlinkClient", "label": "FlinkClient", @@ -37,6 +64,7 @@ "security.kerberos.login.keytab", "security.kerberos.login.use-ticket-cache", "security.kerberos.login.contexts", + "historyserver.archive.fs.dir", "custom.flink.conf.yaml", "classloader.check-leaked-classloader" ] @@ -211,6 +239,17 @@ "hidden": true, "defaultValue": "Client,KafkaClient" }, + { + "name": "historyserver.archive.fs.dir", + "label": "日志路径", + "description": "", + "required": true, + "type": "input", + "value": "/tmp", + "configurableInWizard": true, + "hidden": false, + "defaultValue": "/tmp" + }, { "name": "custom.flink.conf.yaml", "label": "自定义配置flink-conf.yaml", diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/status-history-server.sh b/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/status-history-server.sh new file mode 100644 index 00000000..d77aa49f --- /dev/null +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.2/FLINK/status-history-server.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# 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. +# + +usage="Usage: status-history-server.sh status " + +# if no args specified, show usage +if [ $# -le 1 ]; then + echo $usage + exit 1 +fi +startStop=$1 +shift +command=$1 +SH_DIR=`dirname $0` + + +status(){ + echo "start check $command status" + pid=`ps -aux | grep -iw org.apache.flink.runtime.webmonitor.history.HistoryServer | grep -v grep | awk '{print $2}'` + echo "pid is : $pid" + kill -0 $pid + if [ $? -eq 0 ] + then + echo "$command is running " + else + echo "$command is not running" + exit 1 + fi +} +case $startStop in + (status) + status + ;; + (*) + echo $usage + exit 1 + ;; +esac + + +echo "End $startStop $command." \ No newline at end of file