ToB企服应用市场:ToB评测及商务社交产业平台

标题: Kettle集群搭建与配置 [打印本页]

作者: 杀鸡焉用牛刀    时间: 2024-9-21 03:47
标题: Kettle集群搭建与配置
1、环境预备

1.1、环境信息

1.1.1、使用系统

版本:
名称环境Ipkettle(主)Windows172.16.16.119kettle(从)Centos 7(64 位)172.16.16.127kettle(从)Centos 7(64 位)172.16.16.128 1.2、软件信息

1.2.1、版本信息

版本:
名称版本jdk-8u411-windows-x64.exe1.8.4pdi-ce-9.2.0.0-290.zip9.2.0jdk-8u411-linux-x64.tar.gz1.8.4webkitgtk-2.4.9-1.el7.x86_64.rpm2.4.9mysql-connector-java-8.0.25.jar8.0.25

1.3、软件获取

1.3.1、获取途径

百度网盘连接:链接:https://pan.baidu.com/s/1LqEhGNFTK4ptOl4ebd1f8w 
提取码:uhbj 
2、环境搭建

2.1、主机搭建

2.1.1、主机信息


2.1.2、Windows安装jdk

安装请参考:windows-jdk安装与配置_jdk-8u411-windows-x64.exe-CSDN博客。
2.1.3、Windows安装kettle

安装请参考:windows-kettle安装与配置_pdi-ce-9.2.0.0-290-CSDN博客。
按照2.1.2与2.1.3步调安装完成,自此主机搭建乐成。
2.2、从机搭建

2.2.1、从机信息


2.2.2、linux安装jdk

安装请参考:linux-java1.8安装与配置_linux 安装java1.8-CSDN博客。
2.2.3、linux安装kettle

安装请参考:linux-kettle环境搭建与配置-CSDN博客。
从机172.16.16.127按照2.2.2与2.2.3步调安装完成,自此从机172.16.16.127搭建乐成。
从机172.16.16.128按照2.2.2与2.2.3步调安装完成,自此从机172.16.16.128搭建乐成。
3、集群配置

3.1、主机配置

3.1.1、主机信息


3.1.2、配置内容

进入pwd目录,配置carte-config-master-8080.xml。
  1. ##172.16.16.119
  2. <slave_config>
  3.   <!--
  4.      Document description...
  5.      
  6.      - masters: You can list the slave servers to which this slave has to report back to.
  7.                 If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.
  8.      - report_to_masters : send a message to the defined masters to let them know we exist (Y/N)
  9.      - slaveserver : specify the slave server details of this carte instance.
  10.                      IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.
  11.   -->
  12.   <slaveserver>
  13.     <name>80</name>
  14.     <hostname>172.16.16.119</hostname>
  15.     <port>8081</port>
  16.     <master>Y</master>
  17.   </slaveserver>
  18. </slave_config>
复制代码
3.2、从机配置

3.2.1、从机信息


3.2.2、配置内容

  1. ##172.16.16.127
  2. <slave_config>
  3.   <!--
  4.      Document description...
  5.      - masters: You can list the slave servers to which this slave has to report back to.
  6.                 If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.
  7.      - report_to_masters : send a message to the defined masters to let them know we exist (Y/N)
  8.      - slaveserver : specify the slave server details of this carte instance.
  9.                      IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.
  10.   -->
  11.   <masters>
  12.     <slaveserver>
  13.       <name>80</name>
  14.       <hostname>172.16.16.119</hostname>
  15.       <port>8081</port>
  16.       <username>cluster</username>
  17.       <password>cluster</password>
  18.       <master>Y</master>
  19.     </slaveserver>
  20.   </masters>
  21.   <report_to_masters>Y</report_to_masters>
  22.   <slaveserver>
  23.     <name>81</name>
  24.     <hostname>172.16.16.127</hostname>
  25.     <port>8082</port>
  26.     <username>cluster01</username>
  27.     <password>cluster01</password>
  28.     <master>N</master>
  29.   </slaveserver>
  30. </slave_config>
复制代码
  1. ##172.16.16.128
  2. <slave_config>
  3.   <!--
  4.      Document description...
  5.      - masters: You can list the slave servers to which this slave has to report back to.
  6.                 If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.
  7.      - report_to_masters : send a message to the defined masters to let them know we exist (Y/N)
  8.      - slaveserver : specify the slave server details of this carte instance.
  9.                      IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.
  10.   -->
  11.   <masters>
  12.     <slaveserver>
  13.       <name>80</name>
  14.       <hostname>172.16.16.119</hostname>
  15.       <port>8081</port>
  16.       <username>cluster</username>
  17.       <password>cluster</password>
  18.       <master>Y</master>
  19.     </slaveserver>
  20.   </masters>
  21.   <report_to_masters>Y</report_to_masters>
  22.   <slaveserver>
  23.     <name>82</name>
  24.     <hostname>172.16.16.128</hostname>
  25.     <port>8083</port>
  26.     <username>cluster03</username>
  27.     <password>cluster03</password>
  28.     <master>N</master>
  29.   </slaveserver>
  30. </slave_config>
复制代码
3.3、启动配置

3.3.1、主机信息


3.3.2、主机启动

进入data-integration目录,打开cmd,实行如下下令启动主机,显示如下则配置乐成。
  1. Carte.bat ./pwd/carte-config-master-8080.xml
复制代码

3.3.3、从机信息


3.3.4、从机配置

分别开放两台从机的端口,下令如下:
  1. #172.16.16.127
  2. firewall-cmd --zone=public --add-port=8082/tcp --permanent
  3. firewall-cmd --zone=public --add-port=40000/tcp --permanent
  4. firewall-cmd --reload
  5. #172.16.16.128
  6. firewall-cmd --zone=public --add-port=8083/tcp --permanent
  7. firewall-cmd --zone=public --add-port=40000/tcp --permanent
  8. firewall-cmd --reload
  9. #查看
  10. firewall-cmd --list-ports
复制代码
分别进入data-integration目录,实行如下下令启动从机,显示如下则配置乐成。
  1. #172.16.16.127
  2. ./carte.sh pwd/carte-config-8081.xml
  3. #172.16.16.128
  4. ./carte.sh pwd/carte-config-8082.xml
复制代码


4、案例测试

4.1、服务信息

4.1.1、填写服务信息

主机实行spoon.bat,创建一个转换,在主对象树中创建子服务器,分别填写主机与两台从机的相关信息。



4.1.2、配置schemas

配置schemas,选中Kettle集群schemas,右击新建,填写相关内容如下。

4.1.3、集群运行配置

创建集群运行配置,点击run configuration新建,填写name,engine,选择location即可。

4.2、案例

4.2.1、创建案例

在焦点对象中,在输入选项中选择文本文件输入,在输出选项中选择文本文件输出,方向选择从输入->输出,在输出中点击右击选择集群。

4.3、运行测试

4.3.1、01运行

点击运行,选择集群方式。

结果如下,则证明集群搭建测试并乐成




免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。




欢迎光临 ToB企服应用市场:ToB评测及商务社交产业平台 (https://dis.qidao123.com/) Powered by Discuz! X3.4