You need to enable JavaScript to run this app.
E-MapReduce

E-MapReduce

复制全文
最佳实践
DolphinScheduler 对接 TOS 最佳实践
复制全文
DolphinScheduler 对接 TOS 最佳实践

dolphinscheduler 资源中心支持使用对象存储,从开源官网描述看,已经支持对接 s3,oss 等。EMR on ECS 集成开源组件 dolphinscheduler 3.1.9,为了拓展产品生态,这里对火山 TOS 作为外部对象存储链路进行操作说明。

准备 Proton

说明

本文以Proton 2.2.1版本为例。

  1. 下载 proton sdk。更多版本可参考:Proton 发行版本
wget proton https://proton-pkgs.tos-cn-beijing.volces.com/public/proton-2.2.1-bin.tar.gz
  1. 解压 proton,确认 plugin 目录中 hadoop 对应版本下是否存在 bundle.jar 包。

示例: plugins 目录下存在 proton-hadoop3-bundle-2.2.1.jar 包。

配置 DolphinScheduler

  1. 准备依赖。

将 proton-hadoop3-bundle-2.2.1.jar 移动到 api-server,worker-server 的 libs 目录下。

  1. 修改 common.properties。

api-server,worker-server 的 common.properties 都需要修改成以下形式。

# resource storage type: HDFS, S3, OSS, NONE
resource.storage.type=HDFS
# resource store on HDFS/S3 path, resource file will store to this base path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
resource.storage.upload.base.path=/dolphinscheduler
# if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path
resource.hdfs.root.user=hdfs
# if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir
# 资源存储路径
resource.hdfs.fs.defaultFS=tos://${tos_bucket}/dolphinscheduler
# 指定proton实现访问TOS
fs.tos.impl=io.proton.fs.ProtonFileSystem
fs.AbstractFileSystem.tos.impl=io.proton.fs.ProtonFS
# TOS bucket的endpoint, 以北京为例;视情况选择内网或外网域名
fs.tos.endpoint=tos-cn-beijing.volces.com
# TOS bucket的region
fs.tos.region=cn-beijing
# 访问TOS用的AK/SK
fs.tos.access-key-id=xxx
fs.tos.secret-access-key=xxx

重启 DolphinScheduler

  1. 配置完成后,重启 api-server 和 worker-server,使修改生效。
  2. 在资源中心上传文件。
  1. 进入 TOS 对应的 bucket,查看已经成功上传的文件。
最近更新时间:2025.03.18 19:14:15
这个页面对您有帮助吗?
有用
有用
无用
无用