SeaTunnel是一个非常易用的超高性能分布式数据集成平台,支持海量数据的实时同步。
下载安装包
设置版本
export version="2.3.1"
通过命令下载
wget "https://archive.apache.org/dist/incubator/seatunnel/${version}/apache-seatunnel-incubating-${version}-bin.tar.gz"
解压安装包
tar -xzvf "apache-seatunnel-incubating-${version}-bin.tar.gz"
安装插件
sh bin/install-plugin.sh 2.3.1
这个命令执行的时间有点长,可以按需加载插件
通常不需要所有的连接器插件,所以你可以通过配置指定你需要的插件config/plugin_config,比如你只需要connector-console插件,那么你可以修改plugin_config为
--connectors-v2--
connector-console
--end--
配置作业并启动
seatunnel提供了一些执行模版,如config/v2.batch.config.template
可以直接通过命令执行
./bin/seatunnel.sh --config ./config/v2.batch.config.template -e local
常见问题处理
第一次执行报错信息提示这个
Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:181)
at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: com.hazelcast.core.HazelcastException: Cannot bind to a given address: /127.0.0.1. Hazelcast cannot start. Port [5801] is already in use and auto-increment is disabled.
at com.hazelcast.instance.impl.ServerSocketHelper.createServerSocketChannel(ServerSocketHelper.java:84)
at com.hazelcast.instance.impl.DefaultAddressPicker.getPublicAddressByPortSearch(DefaultAddressPicker.java:147)
at com.hazelcast.instance.impl.DefaultAddressPicker.pickAddress(DefaultAddressPicker.java:121)
at com.hazelcast.instance.impl.Node.<init>(Node.java:215)
at com.hazelcast.instance.impl.HazelcastInstanceImpl.createNode(HazelcastInstanceImpl.java:149)
at com.hazelcast.instance.impl.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:118)
at com.hazelcast.instance.impl.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:217)
at com.hazelcast.instance.impl.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:196)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.createServerInLocal(ClientExecuteCommand.java:226)
at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:87)
... 2 more
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at com.hazelcast.instance.impl.ServerSocketHelper.openServerSocketChannel(ServerSocketHelper.java:133)
at com.hazelcast.instance.impl.ServerSocketHelper.tryOpenServerSocketChannel(ServerSocketHelper.java:101)
at com.hazelcast.instance.impl.ServerSocketHelper.createServerSocketChannel(ServerSocketHelper.java:76)
... 11 more
修改了config下的hazelcast-client.yaml 和hazelcast.yaml
将5801改为6801,任意一个没被使用的端口即可
再次执行就不报错了