1.ds 调用flink 的使用
官方文档连接 :https://dolphinscheduler.apache.org/zh-cn/docs/latest/user_doc/quick-start.html
2. 首先可以创建队列 作为程序调用的时候作为队列使用, 创建后不能删除。
3. 创建租户
1.租户对应的是linux 用户, 用户worker 提交作业所使用的的用户, 如果linux 没有这个用户, worker 会在执行脚本的时候创建这个用户
2.租户和租户编码都是唯一不能重复,好比一个人有名字有身份证号。
3. 创建玩租户会在hdfs 对应的目录上有相关的文件夹。
4. 创建用户:
5. 创建token令牌
6. 给创建的用户授权
7. 用刚才创建的用户登录
http://192.168.1.163:12345/dolphinscheduler/ui/#/monitor/servers/master
8. 资源的上传
9 创建工作流
10 执行结果:
日志结果
总结日志 调用flink 的时候需要配置环境变量 , 可能安装的路径不同可以看日志看到,并且每个workder 都需要添加环境变量
目录
vi /ds/conf/env/dolphinscheduler_env.sh
#
# 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.
#
export HADOOP_HOME=/usr/hdp/current/hadoop-client
export HADOOP_CONF_DIR=etc/hadoop/conf
#export SPARK_HOME1=/opt/soft/spark1
export SPARK_HOME2=/opt/module/spark-2.4.3-bin-hadoop2.7/bin
export PYTHON_HOME=/usr/bin/python
export JAVA_HOME=/opt/module/jdk1.8.0_231
export HIVE_HOME=/usr/hdp/current/hive-client
#export FLINK_HOME=/opt/soft/flink
#export DATAX_HOME=/opt/soft/datax/bin/datax.py
export FLINK_HOME=/opt/module/flink-1.12.4
#export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME:$JAVA_HOME/bin:$HIVE_HOME/bin:$PATH:$FLINK_HOME/bin:$DATAX_HOME:$PATH
export PATH=$HADOOP_HOME/bin:$SPARK_HOME2/bin:$PYTHON_HOME:$JAVA_HOME/bin:$HIVE_HOME/bin:$PATH:$FLINK_HOME/bin
以上需要主要的。
——————————————————————————————————————————————————————————
1. dsAPI调用说明
- 要用到token
- head 里面需要添加的值:
key | value |
---|---|
Content-Type | application/json |
token | 8ecf2318b3a5369a20f73372655503fe |