Seatunel 集群部署

櫰木2年前技术文章1563

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

不出现报错则表示成功



相关文章

Elasticsearch数据生命周期如何规划

Elasticsearch中的open状态的索引都会占用堆内存来存储倒排索引,过多的索引会导致集群整体内存使用率多大,甚至引起内存溢出。所以需要根据自身业务管理历史数据的生命周期,如近3个月的数据op...

Go 错误处理与单元测试

1、错误处理1.1 如何定义错误在 Go 语言中,无论是在类型检查还是编译过程中,都是将错误看做值来对待,和 string 或者 integer 这些类型值并不差别。声明一个 string 类型变量和...

kubernetes集群清理

清理如果你在集群中使用了一次性服务器进行测试,则可以关闭这些服务器,而无需进一步清理。你可以使用 kubectl config delete-cluster 删除对集群的本地引用。但是,如果要更干净地...

Kafka报 IO Exception(many open files)

Kafka报 IO Exception(many open files)

1 线上问题kafka报错many open files,查看日志如下截取部分错误信息2 问题分析首先看kafka监控平台的一些监控指标,topic列表中关于topic的信息项如下所示:(1)topi...

Linux SSSD同步大量AD用户缓慢

Linux SSSD同步大量AD用户缓慢

1、背景在使用AD + sssd (ad作为ldap)同步用户,其中AD中存在10000+ 用户,同步时,用户信息获取缓慢,导致cdh的namenode 的rpc 队列打高,服务不正常。id 用户达到...

mysql表结构对比工具

mysql表结构对比工具

一、AmpNmp.DatabaseCompare工具1、工具特点:优点:比较两个数据库全部表结构的差异,包括表名、存储引擎、字符集、注释的不同,以及每张表中的字段名、数据类型、字符集、默认值、注释的不...

发表评论    

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