Carte是轻量级的HTTP服务器(基于Jetty),后台运行,监听HTTP请求来运行一个作业。其也用于分布式和协调跨机器执行作业,也就是Kettle的集群。
目录
- 一、配置文件
- 1、carte-config-master-8080.xml
- 2、carte-config-8081.xml
- 3、carte-config-8082.xml
- 二、启动Carte集群
- 三、配置子服务器
- 四、配置集群空间
- 五、转换使用集群空间
- 六、转换被拆分至各个节点
一、配置文件
安装目录的pwd目录下
1、carte-config-master-8080.xml
<slave_config><!-- Document description...- masters: You can list the slave servers to which this slave has to report back to.If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.- report_to_masters : send a message to the defined masters to let them know we exist (Y/N)- slaveserver : specify the slave server details of this carte instance.IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.--> <slaveserver><name>master1</name><hostname>localhost</hostname><port>8080</port><master>Y</master></slaveserver></slave_config>
2、carte-config-8081.xml
<slave_config><!-- Document description...- masters: You can list the slave servers to which this slave has to report back to.If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.- report_to_masters : send a message to the defined masters to let them know we exist (Y/N)- slaveserver : specify the slave server details of this carte instance.IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.--> <masters><slaveserver><name>master1</name><hostname>localhost</hostname><port>8080</port><username>cluster</username><password>cluster</password><master>Y</master></slaveserver></masters><report_to_masters>Y</report_to_masters><slaveserver><name>slave1-8081</name><hostname>localhost</hostname><port>8081</port><username>cluster</username><password>cluster</password><master>N</master></slaveserver></slave_config>
3、carte-config-8082.xml
<slave_config><!-- Document description...- masters: You can list the slave servers to which this slave has to report back to.If this is a master, we will contact the other masters to get a list of all the slaves in the cluster.- report_to_masters : send a message to the defined masters to let them know we exist (Y/N)- slaveserver : specify the slave server details of this carte instance.IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.--> <masters><slaveserver><name>master1</name><hostname>localhost</hostname><port>8080</port><username>cluster</username><password>cluster</password><master>Y</master></slaveserver></masters><report_to_masters>Y</report_to_masters><slaveserver><name>slave2-8082</name><hostname>localhost</hostname><port>8082</port><username>cluster</username><password>cluster</password><master>N</master></slaveserver></slave_config>
二、启动Carte集群
D:\kettle\Carte.bat D:\kettle\pwd\carte-config-master-8080.xml
D:\kettle\Carte.bat D:\kettle\pwd\carte-config-8081.xml
D:\kettle\Carte.bat D:\kettle\pwd\carte-config-8082.xml
三、配置子服务器
四、配置集群空间
五、转换使用集群空间
六、转换被拆分至各个节点
写日志在master1上运行
生成记录在节点1和节点2上运行
访问
- http://localhost:8080/kettle/status/
- http://localhost:8081/kettle/status/
- http://localhost:8082/kettle/status/
可以查看各个节点运行情况