Seatunel 集群部署

櫰木1年前技术文章1201

1、基础环境准备

  1. java 1.8 并配置java home

  2. 操作系统:centos7.9

  3. 下载安装包:https://www.apache.org/dyn/closer.lua/seatunnel/2.3.3/apache-seatunnel-2.3.3-bin.tar.gz

2、安装包部署

集群中的每个节点都按照以下方式进行部署

  1. 配置环境变量

    echo "export SEATUNNEL_HOME=/opt/seatunnel" >> /etc/profile
    echo "export PATH=$PATH:$SEATUNNEL_HOME/bin" >> /etc/profile
  1. 添加用户

    useradd seatunnel
  1. 解压安装包,配置软链

    tar -xzvf apache-seatunnel-2.3.3-bin.tar.gz  -C /opt
    ln -s /opt/apache-seatunnel-2.3.3  /opt/seatunnel

3、集群配置

  1. 配置seatunnel服务。切换到/opt/seatunnel/config目录

  2. 编辑调整seatunel.yaml配置文件

    vim seatunnel.yaml
    seatunnel:
      engine:
        history-job-expire-minutes: 1440
        backup-count: 1
        queue-type: blockingqueue
        print-execution-info-interval: 60
        print-job-metrics-info-interval: 60
        slot-service:
          dynamic-slot: true
        checkpoint:
          interval: 10000
          timeout: 60000
          storage:
            type: hdfs
            max-retained: 3
            plugin-config:
              namespace: /tmp/seatunnel/checkpoint_snapshot
              storage.type: hdfs
              fs.defaultFS: hdfs://mycluster
              seatunnel.hadoop.dfs.nameservices: mycluster
              seatunnel.hadoop.dfs.ha.namenodes.mycluster: nn1,nn2
              seatunnel.hadoop.dfs.namenode.rpc-address.mycluster.nn2: hadoop002:8020
              seatunnel.hadoop.dfs.namenode.rpc-address.mycluster.nn1: hadoop001:8020

checkpoint 配置使用hdfs存储,并通过nameservice进行操作。通过查看core-site.xml和hdfs-site.xml查看nameservice相关配置

  1. 配置高可用配置

  2. 编辑调整hazelcast.yaml 配置文件

    vim hazelcast.yaml
    hazelcast:
      cluster-name: seatunnel
      network:
        rest-api:
          enabled: true
          endpoint-groups:
            CLUSTER_WRITE:
              enabled: true
            DATA:
              enabled: true
        join:
          tcp-ip:
            enabled: true
            member-list:
              - hadoop001
              - hadoop002
              - hadoop003
        port:
          auto-increment: false
          port: 5801
      properties:
        hazelcast.invocation.max.retry.count: 20
        hazelcast.tcp.join.port.try.count: 30
        hazelcast.logging.type: log4j2
        hazelcast.operation.generic.thread.count: 50

member-list     集群节点列表

cluster-name: seatunnel  集群名称

4、启动集群

  1. 启动集群

    #切换到seatunnel用户
    su - seatunnel
    #启动seatunnel
    cd /opt/seatunnel
    #创建日志目录
    mkdir -p /opt/seatunnel/logs
    /bin/seatunnel-cluster.sh -d 
    #停止seatunnel
    ./bin/stop-seatunnel-cluster.sh

检测是否启动成功

ss -tunlp | grep 5801

image.png

5、测试服务

  1. 配置客户端配置

    vim /opt/seatunnel/config/hazelcast-client.yaml
    hazelcast-client:
      cluster-name: seatunnel
      properties:
        hazelcast.logging.type: log4j2
      network:
        cluster-members:
          - hadoop001:5801
          - hadoop002:5801
          - hadoop003:5801

cluster-name 需要和集群配置文件中一致

cluster-members 集群清单需要和集群节点中一致

  1. 运行测试命令

cd /opt/seatunnel
./bin/seatunnel.sh --config config/v2.batch.config.template

不出现报错则表示成功



相关文章

win2016系统新增辅助网卡无法访问公网

win2016系统新增辅助网卡无法访问公网

问题现象:一台阿里云win2016系统服务器,在主网卡已绑定弹性公网ip之后,再新增了一块辅助网卡,无法访问公网。另外,使用NAT网关做了dnat到辅助网卡的映射。该台服务器网卡信息为:主网卡:172...

Flink 状态管理

Flink 状态管理

一、  Flink 中的状态1、由一个任务维护,并且用来计算某个结果的所有数据,都属于这个任务的状态 2、可以认为状态就是一个本地变量,可以被任务的业务逻辑访问 3、Flink 会进行状态管理,包括状...

企业级大数据安全架构(三)

企业级大数据安全架构(三)

一、Ambair修改集群节点hostname在后面安装FreeIPA,需要机器名带全域名,如果我们之前集群节点机器名不是全域名可以按照下面方法在Ambari上修改所有节点机器名1.部署节点说明本次测试...

helm安装部署trino对接hive(一)

helm安装部署trino对接hive(一)

前提:本文前提是基于hive组件已经提前安装的情况下,安装部署好trino容器之后进行对hive组件的对接。helm trino地址:https://artifacthub.io/packages/h...

MS SQL Server 实战 统计与汇总重复记录

MS SQL Server 实战 统计与汇总重复记录

需求在日常的数据管理应用中,统计和汇总重复记录的情况是经常遇到的一个问题,然后我们会根据统计结果进一步对数据进行合理化处理。比如我们有一组题库数据,主要包括题目和选项字段(如单选题目、多选题目和判断题...

PG的锁(一)

一、表级锁1.1 表级锁模式常见锁模式以及应用场景:ACCESS SHARE :select操作获取该模式锁资源,通常情况下所有只读取不修改表的查询都会获取该模式锁资源ROW SHARE : sele...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。