《Kettle保姆级教学-Carte集群搭建及启动使用》

发布于:2025-03-02 ⋅ 阅读:(119) ⋅ 点赞:(0)

Carte是轻量级的HTTP服务器(基于Jetty),后台运行,监听HTTP请求来运行一个作业。其也用于分布式和协调跨机器执行作业,也就是Kettle的集群。

一、配置文件

安装目录的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/
    可以查看各个节点运行情况
    在这里插入图片描述
    在这里插入图片描述

网站公告

今日签到

点亮在社区的每一天
去签到