首页 > 其他分享 >kettle从入门到精通 第三十六课 kettle carte 集群

kettle从入门到精通 第三十六课 kettle carte 集群

时间:2024-01-30 10:47:37浏览次数:19  
标签:xml kettle cluster pwd 集群 第三十六 config carte

1、carte服务可以单体运行也可以集群方式运行,今天我们一起来学习下carte的集群模式部署和使用。本次示例用一个master和两个slave从节点演示。

carte-config-master-8080.xml  配置文件:

 1 <slave_config>
 2 <!--
 3 Document description...
 4 
 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 
 8 - report_to_masters : send a message to the defined masters to let them know we exist (Y/N)
 9 
10 - slaveserver : specify the slave server details of this carte instance.
11 IMPORTANT : the username and password specified here are used by the master instances to connect to this slave.
12 
13 -->
14 
15 <slaveserver>
16 <name>master1</name>
17 <hostname>xxx.xxx.6.89</hostname>
18 <port>8080</port>
19 <master>Y</master>
20 </slaveserver>
21 <repository>
22 <id>KettleDatabaseRepository</id>
23 <name>kettleDb</name>
24 <description>Database repository</description>
25 <is_default>true</is_default>
26 <connection>kettleDb</connection>
27 </repository>
28 
29 </slave_config>

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>xxx.xxx.6.89</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>xxx.xxx.6.89</hostname>
<port>8081</port>
<username>cluster</username>
<password>cluster</password>
<master>N</master>
</slaveserver>


</slave_config>

carte-config-8082.xml 配置文件同carte-config-8081.xml 配置文件类似,这里省略。以上配置文件在pwd目录下,如下图所示:

2、启动主carte服务

windows:Carte.bat pwd/carte-config-master-8080.xml 

linux:sh carte.sh pwd/carte-config-master-8080.xml 

 

 3、启动从carte服务

windows:

Carte.bat pwd/carte-config-8081.xml 

Carte.bat pwd/carte-config-8082.xml

linux:

sh carte.sh pwd/carte-config-8081.xml 

sh carte.sh pwd/carte-config-8082.xml

 

 

4、运行Spoon.bat或者spoon.sh 客户端,编辑转换文件,新建子服务器,将三个carte服务添加进来如下所示:

默认用户名和密码都是cluster,也可以自行修改。

 

 

 5、基于子服务器列表创建kettle集群schemas,选择设置好的子服务器,这里演示采用静态cluster,Dynamic cluster模式支持动态添加子服务器。

 

6、设置转换文件中步骤的集群模式,右键生成记录步骤,选择自己创建的carte集群即可。

7、集群模式运行转换文件。通过集群提交时,作业或者转换是通过集群Master提交作业,Master和多个Slave采用动态抢占式(排它锁)机制抢占任务,实施任务的运行操作。

 

 

 

标签:xml,kettle,cluster,pwd,集群,第三十六,config,carte
From: https://www.cnblogs.com/zjBoy/p/17987265

相关文章

  • kettle 定时调用转换
    [root@localhostdata-integration]#catrun_logintop.sh#!/bin/bashcd/home/data-integrationnohup/home/data-integration/pan.sh-file=/home/data-integration/logintop10.ktr& 数据库连接搞不上的时候  kettle安装文件夹下面的 simple-jndi找到jdbc.propert......
  • kettle从入门到精通 第三十五课 kettle 变量
    1、设置变量a、可以通过转换中的“设置变量”步骤进行设置。 b、手动通过kettle.properties文件或通过“编辑”菜单中的“设置环境变量”对话框来定义变量。kettle.properties文件的位置可以通过设置KETTLE_HOME来指定,如设置KETTLE_HOME为/opt/kettle/home,则kettle.propert......
  • kettle从入门到精通 第三十四课 kettle 错误处理
    1、我们在平常写应用程序的时候,需要主动捕获异常或者错误,不然程序有可能异常退出。同样kettle也支持异常或者错误处理,下图展示的是在批量插入数据的时候捕获异常,如唯一健冲突,死锁等,并将错误信息保存到表里面,方便后续邮件预警和排查问题。2、在需要异常处理的步骤上面右键,点击定......
  • Kettle部署centos7并添加远程图形界面访问
    Kettle部署centos7并添加远程图形界面访问安装运行环境安装远程访问(xmanager)添加中文支持安装运行环境kettle需要java环境才能运行,因此要安装Java,点击我查看部署jdk。安装图形化界面1yumgroupinstall"XWindowSystem" 上传ketle文件,并上传至服务器......
  • centos7 安装kettle 并实现图形化界面
    说实在的,在centos上实现kettle图形化,有点脱裤子放屁的感觉;话不多说干起来;本案例采用了kettle官网的pdi-ce-9.0.0.0-423.zip版本;centos7图形化工具为VNC-Server 一:部署kettle1.上传后,解压文件到指定目录unzippdi-ce-9.0.0.0-423.zip-d/data/software/2.进入:/data/softw......
  • kettle报错ldconfig: command not found解决方法
    一、前言之前测试服务器有一个kettle是正常的;后来让换服务器,把kettle迁移后,就发现了问题。1.手动执行以下命令是可以运行kettle的:LOG_DATE=`date+%Y%m%d`LOG_PATH=/home/admin/kettle/logs/mykettle_${LOG_DATE}.logKJB_PATH=/home/admin/kettle/kjb/home/admin/kettle/dat......
  • kettle从入门到精通 第三十三课 再谈 kettle 表输出 分区/分片
    1、之前第九章有讲过kettle表输出步骤,里面有简单的提到过表输出步骤里面的表分区设置,这里详细介绍下。 表分区数据:选择此选项可根据“分区”字段中指定的日期字段的值将数据拆分到多个表中。选择此选项后,数据将插入到表中,这些表的名称遵循<targettable>_<dateformat>模式,如t......
  • Kettle
    Kettle是一款国外开源的ETL工具,纯java编写,可以在Window、Linux、Unix上运行,绿色无需安装,数据抽取高效稳定。Kettle中文名称叫水壶,该项目的主程序员MATT希望把各种数据放到一个壶里,然后以一种指定的格式流出。Kettle这个ETL工具集,它允许你管理来自不同数据库的数据,通过提供一个......
  • 无涯教程-SQL - CARTESIAN JOIN函数
    CARTESIANJOIN或CROSSJOIN从两个或多个联接表中返回记录集的笛卡尔积。CARTESIANJOIN-语法CARTESIANJOIN或CROSSJOIN的基本语法如下-SELECTtable1.column1,table2.column2...FROMtable1,table2[,table3]CARTESIANJOIN-示例请考虑以下两个表。表1-C......
  • kettle从入门到精通 第三十一课 mysql 数据连接连接池配置
    无论开发应用程序还是做ETL研发,都离不开连接池的应用,如下是kettle中mysql连接池设置界面,今天重点讲解下连接池中的参数配置。defaultAutoCommit当defaultAutoCommit参数设置为true时,表示连接会自动提交每个单独的SQL语句,这意味着每个语句都将被当作一个独立的事务自动提交......