当前位置:网站首页>Apache SeaTunnel 2.1.0部署及踩坑
Apache SeaTunnel 2.1.0部署及踩坑
2022-04-23 06:03:00 【若小鱼】
简介
SeaTunnel 原名Waterdrop,自2021年10月12日改名为SeaTunnel。
SeaTunnel是一个非常易于使用的超高性能分布式数据集成平台,支持海量数据的实时同步。它每天可以稳定高效地同步数百亿数据,已在近100家公司的生产中使用。
特点
- 易于使用,配置灵活,低代码开发
- 实时流媒体
- 离线多源数据分析
- 高性能、海量数据处理能力
- 模块化和插入式机构,易于扩展
- 支持通过SQL进行数据处理和聚合
- 支持Spark结构化流媒体
- 支持Spark 2.x
- 这里我们踩了一个坑,因为我们测试的spark环境已经升级到了3.x版本,而目前SeaTunnel只支持2.x,所以要重新部署一个2.x的spark
-
- 这里我们踩了一个坑,因为我们测试的spark环境已经升级到了3.x版本,而目前SeaTunnel只支持2.x,所以要重新部署一个2.x的spark
工作流程

安装
安装文档
https://seatunnel.incubator.apache.org/docs/2.1.0/spark/installation
- 环境准备:安装jdk和spark
- config/seatunnel-env.sh
- 下载安装包
- https://www.apache.org/dyn/closer.lua/incubator/seatunnel/2.1.0/apache-seatunnel-incubating-2.1.0-bin.tar.gz
- 解压后编辑 config/seatunnel-env.sh
- 指定必要的环境配置,例如SPARK_HOME(SPARK下载和解压缩后的目录)
1、测试jdbc-to-jdbc
- 创建新的 config/spark.batch.jdbc.to.jdbc.conf 文件
env {
# seatunnel defined streaming batch duration in seconds
spark.app.name = "SeaTunnel"
spark.executor.instances = 1
spark.executor.cores = 1
spark.executor.memory = "1g"
}
source {
jdbc {
driver = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://0.0.0.0:3306/database?useUnicode=true&characterEncoding=utf8&useSSL=false"
table = "table_name"
result_table_name = "result_table_name"
user = "root"
password = "password"
}
}
transform {
# split data by specific delimiter
# you can also use other filter plugins, such as sql
# sql {
# sql = "select * from accesslog where request_time > 1000"
# }
# If you would like to get more information about how to configure seatunnel and see full list of filter plugins,
# please go to https://seatunnel.apache.org/docs/spark/configuration/transform-plugins/Sql
}
sink {
# choose stdout output plugin to output data to console
# Console {}
jdbc {
# 这里配置driver参数,否则数据交换不成功
driver = "com.mysql.jdbc.Driver",
saveMode = "update",
url = "jdbc:mysql://ip:3306/database?useUnicode=true&characterEncoding=utf8&useSSL=false",
user = "userName",
password = "***********",
dbTable = "tableName",
customUpdateStmt = "INSERT INTO table (column1, column2, created, modified, yn) values(?, ?, now(), now(), 1) ON DUPLICATE KEY UPDATE column1 = IFNULL(VALUES (column1), column1), column2 = IFNULL(VALUES (column2), column2)"
}
}
yarn启动命令
./bin/start-seatunnel-spark.sh --master 'yarn' --deploy-mode client --config ./config/spark.batch.jdbc.to.jdbc.conf
踩坑:运行时报[driver] as non-empty ,定位发现sink配置里需要设置driver参数
ERROR Seatunnel:121 - Plugin[org.apache.seatunnel.spark.sink.Jdbc] contains invalid config, error: please specify [driver] as non-empty

版权声明
本文为[若小鱼]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_44162809/article/details/124347352
边栏推荐
- How does thanos configure different data retention durations for different tenants
- RAC环境数据库节点参数设置不当导致监听无法连接问题排查
- 异常记录-20
- 【不积跬步无以至千里】Oracle应用导数Ora-01455报错处理
- ansible模块之include_tasks:为什么加了tags后导入的任务没有执行?
- Oracle net service: listener and service name resolution method
- Typical application scenarios of alicloud log service SLS
- Chaos takes you to the chaos project quickly
- Kubernetes CoreDNS常见问题资料参考
- Oracle数据库性能分析之常用视图
猜你喜欢

Prometheus Cortex架构概述(水平可扩展、高可用、多租户、长期存储)

Web登录小案例(含验证码登录)

基于DPDK实现VPC和IDC间互联互通的高性能网关

Prometheus Cortex使用Block存储时的相关问题

你应该知道的 JVM 基础知识

Kids and COVID: why young immune systems are still on top

Chaos takes you to the chaos project quickly

try catch 不能捕获异步错误

Virtio and Vhost_ Net introduction

Oracle redo log产生量大的查找思路与案例
随机推荐
[no steps in a small step to a thousand miles] Oracle Application derivative ora-01455 error reporting processing
Oracle Net Service:监听器与服务名解析方法
10g数据库使用大内存主机时不能启动的问题
Redis 详解(基础+数据类型+事务+持久化+发布订阅+主从复制+哨兵+缓存穿透、击穿、雪崩)
通过源码探究@ModelAndView如何实现数据与页面的转发
[MySQL basics] startup options and configuration files
数据库基本概念:OLTP/OLAP/HTAP、RPO/RTO、MPP
[shell script exercise] batch add the newly added disks to the specified VG
【ES6快速入门】
Use the SED command to process text efficiently
Oracle net service: listener and service name resolution method
异常记录-18
一个DG环境的ORA-16047: DGID mismatch between destination setting and target database问题排查及监听VNCR特性
Construire un blog Cloud basé sur ECS (bénédiction sur le Code Cloud Xiaobao, explication détaillée de la tâche iphone13 gratuite)
DDOS攻击/防御介绍
【MySQL基础篇】数据导出导入权限与local_infile参数
异常记录-7
Ansible基本命令、角色、内置变量与tests判断
Oracle redo log产生量大的查找思路与案例
异常记录-6