当前位置: 首页 > news >正文

部署SeaTunnel单节点Standalone 模式环境

1.前置准备:

        SeaTunnel支持运行在JDK8及以上环境。该步骤需要用户自行安装JDK环境。

2.下载安装包

        本次部署使用的是2.3.1版本。如果你需要下载其它版本,可以从如下网址中查询对应的版本。

Apache SeaTunnel

​
mkdir ~/seatunnel
cd ~/seatunnelwget https://dlcdn.apache.org/seatunnel/2.3.1/apache-seatunnel-incubating-2.3.1-bin.tar.gztar -zxvf apache-seatunnel-incubating-2.3.1-bin.tar.gz​

3.安装需要的插件

        SeaTunnel需要自己安装同步数据需要的连接器插件,需要用户编辑config下plugin_config文件,该文件描述了需要下载和安装的连接器插件,默认所有已经支持的连接器插件都会下载和安装。我们可以修改该文件,删除我们不需要的插件,只保留我们需要的插件。

cd ~/seatunnel/apache-seatunnel-incubating-2.3.1
vi config/plugin_config

4.运行下载命令

        运行下载安装连接器插件的命令:

cd ~/seatunnel/apache-seatunnel-incubating-2.3.1
sh bin/install-plugin.sh

等待命令执行完成,连接器插件即下载安装完成。安装完成后可见~/seatunnel/apache-seatunnel-incubation-2.3.1/connectors/seatunnel/目录下已经有了安装好的连接器插件。

-rw-r--r-- 1 root root  11501046 10月 24 19:00 connector-amazondynamodb-2.3.1.jar
-rw-r--r-- 1 root root     70099 10月 24 19:01 connector-assert-2.3.1.jar
-rw-r--r-- 1 root root  13850207 10月 24 19:17 connector-cassandra-2.3.1.jar
-rw-r--r-- 1 root root  31837415 10月 24 19:39 connector-cdc-mysql-2.3.1.jar
-rw-r--r-- 1 root root  30487309 10月 24 20:17 connector-clickhouse-2.3.1.jar
-rw-r--r-- 1 root root     52023 2月  18 2022 connector-console-2.3.1.jar
-rw-r--r-- 1 root root   7004361 10月 24 20:29 connector-datahub-2.3.1.jar
-rw-r--r-- 1 root root   5575890 10月 24 20:33 connector-dingtalk-2.3.1.jar
-rw-r--r-- 1 root root   1972948 10月 24 20:36 connector-doris-2.3.1.jar
-rw-r--r-- 1 root root   5475697 10月 24 20:43 connector-elasticsearch-2.3.1.jar
-rw-r--r-- 1 root root    730013 10月 24 20:44 connector-email-2.3.1.jar
-rw-r--r-- 1 root root    153432 2月  18 2022 connector-fake-2.3.1.jar
-rw-r--r-- 1 root root  23578424 10月 24 22:10 connector-file-hadoop-2.3.1.jar
-rw-r--r-- 1 root root  23574827 10月 24 22:57 connector-file-local-2.3.1.jar
-rw-r--r-- 1 root root 235391594 10月 25 00:36 connector-file-oss-jindo-2.3.1.jar
-rw-r--r-- 1 root root  26585017 10月 25 00:39 connector-file-s3-2.3.1.jar
-rw-r--r-- 1 root root  23878459 10月 25 00:43 connector-file-sftp-2.3.1.jar
-rw-r--r-- 1 root root   6840166 10月 25 00:52 connector-google-sheets-2.3.1.jar
-rw-r--r-- 1 root root  50730916 10月 25 03:22 connector-hbase-2.3.1.jar
-rw-r--r-- 1 root root  23598219 10月 25 01:05 connector-hive-2.3.1.jar
-rw-r--r-- 1 root root   5177581 10月 25 01:12 connector-http-base-2.3.1.jar
-rw-r--r-- 1 root root   5180838 10月 25 01:19 connector-http-feishu-2.3.1.jar
-rw-r--r-- 1 root root   5186017 10月 25 01:27 connector-http-github-2.3.1.jar
-rw-r--r-- 1 root root   5185488 10月 25 01:22 connector-http-gitlab-2.3.1.jar
-rw-r--r-- 1 root root   5184487 10月 25 01:32 connector-http-jira-2.3.1.jar
-rw-r--r-- 1 root root   5185674 10月 25 01:36 connector-http-klaviyo-2.3.1.jar
-rw-r--r-- 1 root root   5185305 10月 25 01:41 connector-http-lemlist-2.3.1.jar
-rw-r--r-- 1 root root   5188184 10月 25 01:44 connector-http-myhours-2.3.1.jar
-rw-r--r-- 1 root root   5185496 10月 25 01:48 connector-http-notion-2.3.1.jar
-rw-r--r-- 1 root root   5185558 10月 25 01:52 connector-http-onesignal-2.3.1.jar
-rw-r--r-- 1 root root   5185309 10月 25 01:54 connector-http-wechat-2.3.1.jar
-rw-r--r-- 1 root root 168487797 10月 25 02:45 connector-hudi-2.3.1.jar
-rw-r--r-- 1 root root  29383607 10月 25 02:49 connector-iceberg-2.3.1.jar
-rw-r--r-- 1 root root   3444329 10月 25 02:49 connector-influxdb-2.3.1.jar
-rw-r--r-- 1 root root   5780985 10月 25 02:50 connector-iotdb-2.3.1.jar
-rw-r--r-- 1 root root    288042 10月 25 02:50 connector-jdbc-2.3.1.jar
-rw-r--r-- 1 root root  13731460 10月 25 02:53 connector-kafka-2.3.1.jar
-rw-r--r-- 1 root root  25520058 10月 25 02:54 connector-kudu-2.3.1.jar
-rw-r--r-- 1 root root  20540761 10月 25 02:55 connector-maxcompute-2.3.1.jar
-rw-r--r-- 1 root root   2419398 10月 25 02:56 connector-mongodb-2.3.1.jar
-rw-r--r-- 1 root root   5070244 10月 25 02:57 connector-neo4j-2.3.1.jar
-rw-r--r-- 1 root root 148797758 10月 25 03:11 connector-openmldb-2.3.1.jar
-rw-r--r-- 1 root root  42273251 10月 25 03:11 connector-pulsar-2.3.1.jar
-rw-r--r-- 1 root root    790519 10月 25 03:11 connector-rabbitmq-2.3.1.jar
-rw-r--r-- 1 root root   1331781 10月 25 03:12 connector-redis-2.3.1.jar
-rw-r--r-- 1 root root  35638134 10月 25 03:16 connector-s3-redshift-2.3.1.jar
-rw-r--r-- 1 root root   1623004 10月 25 03:21 connector-selectdb-cloud-2.3.1.jar
-rw-r--r-- 1 root root    625274 10月 25 03:16 connector-sentry-2.3.1.jar
-rw-r--r-- 1 root root   5930367 10月 25 03:17 connector-slack-2.3.1.jar
-rw-r--r-- 1 root root    134855 10月 25 03:17 connector-socket-2.3.1.jar
-rw-r--r-- 1 root root  20267439 10月 25 03:20 connector-starrocks-2.3.1.jar
-rw-r--r-- 1 root root  10758366 10月 25 03:21 connector-tablestore-2.3.1.jar

5.启动一个单节点SeaTunnel

cd ~/seatunnel/apache-seatunnel-incubating-2.3.1
nohup sh bin/seatunnel-cluster.sh 2>&1 &

通过jps命令我们能查看进程是否已经启动,进程名为SeaTunnelServer

6.使用自带例子测试任务

        在config目录下有一个自带的实时同步任务的配置文件v2.streaming.conf.template,该文件定义了一个作业,使用一个叫FakeSource的Source连接器生成数据,并将数据发送给Console这个Sink,Console Sink的作用是将接收到的数据打印到控制台。

        所以运行该作业可以看到在控制台中会打印数据,因为是实时作业,该作业不会自动停止,v2.streaming.conf.template文件的内容如下:

#
# 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.
#
######
###### This config file is a demonstration of streaming processing in Seatunnel config
######env {# You can set flink configuration hereexecution.parallelism = 2job.mode = "STREAMING"checkpoint.interval = 2000#execution.checkpoint.interval = 10000#execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}source {# This is a example source plugin **only for test and demonstrate the feature source plugin**FakeSource {parallelism = 2result_table_name = "fake"row.num = 16schema = {fields {name = "string"age = "int"}}}# If you would like to get more information about how to configure Seatunnel and see full list of source plugins,# please go to https://seatunnel.apache.org/docs/category/source-v2
}sink {Console {}# If you would like to get more information about how to configure Seatunnel and see full list of sink plugins,# please go to https://seatunnel.apache.org/docs/category/sink-v2

         执行该demo作业:

cd ~/seatunnel/apache-seatunnel-incubating-2.3.1
sh bin/seatunnel.sh --config config/v2.streaming.conf.template

        运行结果

***********************************************
Job Id                    :  769365937475289089
Read Count So Far         :                  32
Write Count So Far        :                  32
Average Read Count        :                 0/s
Average Write Count       :                 0/s
Last Statistic Time       : 2023-10-25 09:23:34
Current Statistic Time    : 2023-10-25 09:24:34
***********************************************2023-10-25 09:25:33,998 INFO  org.apache.seatunnel.engine.client.job.JobMetricsRunner - 
***********************************************Job Progress Information
***********************************************
Job Id                    :  769365937475289089
Read Count So Far         :                  32
Write Count So Far        :                  32
Average Read Count        :                 0/s
Average Write Count       :                 0/s
Last Statistic Time       : 2023-10-25 09:24:34
Current Statistic Time    : 2023-10-25 09:25:33
***********************************************

        说明作业正常运行,通过Control+C结束该作业,中止作业运行,SeaTunnel部署及验证完成。

http://www.lryc.cn/news/205235.html

相关文章:

  • 二十三、设计模式之组合模式![
  • hbase和aerospike基础概念及所对应的python包API使用
  • 监测难?误差大?北斗突破铁路监测预警难题,24小时全方位守护
  • kafka入门03——简单实战
  • 工作两年,本地git分支达到了惊人的361个,该怎么快速清理呢?
  • 行业追踪,2023-10-24
  • 【成功实现】CentOS磁盘扩容
  • 为什么亚马逊卖家一定要有独立站?新手低成本快速搭建跨境电商独立站完整图文教程
  • spring Environment上下文环境参数变量
  • 【数据库】组合查询 UNION
  • Spring Boot配置 application.yml,根据application.yml选择启动配置
  • 一文了解GC垃圾回收
  • 触摸屏与施耐德PLC之间MODBUS无线通讯
  • BOA服务器(一):简介
  • 最详细STM32,cubeMX 超声波测距
  • Java实现连接SQL Server解决方案及代码
  • 如何用 JMeter 编写性能测试脚本?
  • vue3+vite在线预览pdf
  • Python深度学习实战-基于Sequential方法搭建BP神经网络实现分类任务(附源码和实现效果)
  • 【前端】Webpack5中Html和CSS的压缩打包
  • postman接收后端返回的文件流并自动下载
  • 谈谈Net-SNMP软件
  • 前端对普通数字数组排序示例
  • SQL server中:常见问题汇总(如:修改表时不允许修改表结构、将截断字符串或二进制数据等)
  • 无线通信中CSI的含义
  • 如何一键核实验证身份证的真伪?
  • 冒泡排序:了解原理与实现
  • springboot maven项目环境搭建idea
  • vue3检测是手机还是pc端,监测视图窗口变化
  • B - Magical Subsequence (CCPC2021哈尔滨)