Apache SeaTunnel 2.3.5 Zeta-Server集群环境搭建与使用

作者 | 月影幽篁

在当前数据驱动的业务环境中,快速且高效的数据处理能力至关重要。Apache SeaTunnel以其卓越的性能和灵活性,成为数据工程师和开发者的首选工具之一。本文将介绍如何在集群环境中搭建Apache SeaTunnel 2.3.5版本的 Zeta-Server,并概述其使用方法。

SeaTunnel二进制包下载

下载地址:https://seatunnel.apache.org/zh-CN/download

SeaTunnel环境变量配置

编辑/etc/profile文件,添加如下配置:

复制代码
export SEATUNNEL_HOME=${seatunnel install path}
export PATH=$PATH:$SEATUNNEL_HOME/bin

SeaTunnel Zeta Server配置

JVM配置

SeaTunnel Zeta Server的jvm配置文件路径为${SEATUNNEL_HOME}/config/jvm_options,可以在这里调整JVM相关配置。

引擎配置

一定要编辑的几个配置:

  • cluster-name SeaTunnel Engine 节点使用 cluster-name 来确定另一个节点是否与自己在同一集群中。如果两个节点之间的集群名称不同,SeaTunnel 引擎将拒绝服务请求。

  • 网络 基于 Hazelcast, 一个 SeaTunnel Engine 集群是由运行 SeaTunnel Engine 服务器的集群成员组成的网络。 集群成员自动加入一起形成集群。这种自动加入是通过集群成员使用的各种发现机制来相互发现的。

请注意,集群形成后,集群成员之间的通信始终通过 TCP/IP 进行,无论使用的发现机制如何。 示例:

复制代码
hazelcast:
  cluster-name: seatunnel
  network:
    join:
      tcp-ip:
        enabled: true
        member-list:
          - hostname1
    port:
      auto-increment: false
      port: 5801
  properties:
    hazelcast.logging.type: log4j2
  • 类加载器缓存模式(classloader-cache-mode) 此配置主要解决不断创建和尝试销毁类加载器所导致的资源泄漏问题。 如果您遇到与元空间溢出相关的异常,您可以尝试启用此配置。 为了减少创建类加载器的频率,在启用此配置后,SeaTunnel 在作业完成时不会尝试释放相应的类加载器,以便它可以被后续作业使用,也就是说,当运行作业中使用的 Source/Sink 连接器类型不是太多时,它更有效。 默认值是 false。示例:

    seatunnel:
    engine:
    classloader-cache-mode: true

  • 历史作业过期配置(history-job-expire-minutes) 每个完成的作业的信息,如状态、计数器和错误日志,都存储在 IMap 对象中。随着运行作业数量的增加,内存会增加,最终内存将溢出。因此,您可以调整 history-job-expire-minutes 参数来解决这个问题。此参数的时间单位是分钟。默认值是 1440 分钟,即一天。示例:

    seatunnel:
    engine:
    history-job-expire-minutes: 1440

更多配置可以参考官方文档:https://seatunnel.apache.org/zh-CN/docs/2.3.5/seatunnel-engine/deployment#4-配置-seatunnel-engine

Client配置

JVM配置

SeaTunnel Client的jvm配置文件路径为${SEATUNNEL_HOME}/config/jvm_client_options,可以在这里调整JVM相关配置,在使用bin/seatunnel.sh --config xxx.conf提交任务时会启动一个java进程,可以使用此配置来控制java进程参数。

复制代码
#
# 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.
#

# JVM Heap
-Xms1g
-Xmx1g

# JVM Dump
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/icarbon_saas/bigdata/seatunnel/dump/zeta-client

引擎客户端配置

引擎客户端配置文件路径为:${SEATUNNEL_HOME}/config/hazelcast-client.yaml

  • cluster-name 客户端必须与 SeaTunnel Engine 具有相同的 cluster-name。否则,SeaTunnel Engine 将拒绝客户端的请求。

  • cluster-members 需要将所有 SeaTunnel Engine 服务器节点的地址添加到这里。示例:

    hazelcast-client:
    cluster-name: seatunnel
    properties:
    hazelcast.logging.type: log4j2
    network:
    cluster-members:
    - hostname1:5801

启动Seatunnel Engine

复制代码
${SEATUNNEL_HOME}/bin/seatunnel-cluster.sh -d

本文由 白鲸开源科技 提供发布支持!

相关推荐
Psycho_MrZhang2 分钟前
业务应用系统类型和常用名词
大数据
Hello.Reader2 分钟前
Flink Procedures 用 SQL 的 `CALL` 跑 Flink Job(实现、类型推断、命名参数、Catalog 集成一篇搞懂)
大数据·sql·flink
武子康13 分钟前
大数据-195 KNN/K近邻算法实战:欧氏距离+投票机制手写实现,含可视化与调参要点
大数据·后端·机器学习
毕小宝13 分钟前
Elasticsearch 条件字段为 date 类型时注意事项
大数据·elasticsearch·搜索引擎
是阿威啊38 分钟前
企业级的RDD、 Spark SQL、DataFrame、Dataset使用场景介绍
大数据·sql·spark
Pocker_Spades_A1 小时前
AI Ping 上线 GLM-4.7 与 MiniMax M2.1:两款国产旗舰模型免费用!
大数据·数据库·人工智能
简道云平台1 小时前
工程BOM、制造BOM、成本BOM有什么区别?三套 BOM 各自解决什么问题?
大数据·制造·bom
Sui_Network1 小时前
回顾 2025,Sui 技术栈的落地之年
大数据·人工智能·web3·去中心化·区块链
卜锦元1 小时前
Golang后端性能优化手册(第一章:数据库性能优化)
大数据·开发语言·数据库·人工智能·后端·性能优化·golang
小北方城市网1 小时前
第 9 课:Node.js + Express 后端实战 —— 为任务管理系统搭建专属 API 服务
大数据·前端·ai·node.js·express