DolphinScheduler 调用flink以及api的 使用

8 篇文章 1 订阅

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调用说明

  1. 要用到token
  2. head 里面需要添加的值:
keyvalue
Content-Typeapplication/json
token8ecf2318b3a5369a20f73372655503fe

在这里插入图片描述

2. 如下图

2. 创建项目

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

2.1 创建项目的源码

在这里插入图片描述
在这里插入图片描述

3. 查询token

在这里插入图片描述
在这里插入图片描述

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值