一、设置KETTLE_HOME环境变量
假设kettle软件目录为/xxx/data-integration
vi ~/.bash_profile
export KETTLE_HOME=/xxx/data-integration/config
source ~/.bash_profile
echo $KETTLE_HOME
二、启动 carte 命令
1、cd /xxx/data-integration
./carte.sh ./pwd/carte-config.xml &
2、cd /xxx/data-integration && ./carte.sh ./pwd/carte-config.xml &
3、& 可以使carte以后台服务方式运行
三、停止carte服务的几种方式
1、curl -u cluster:cluster http://127.0.0.1:8080/kettle/stopCarte/
2、浏览器访问http://127.0.0.1:8080/kettle/stopCarte/,然后输入用户名和密码(cluster:cluster)
3、Carte 127.0.0.1 8080 -s -p cluster -u cluster
4、ps aux | grep carte 然后根据kill 进程id
四、carte web 管理页面
http://127.0.0.1:8080/kettle/status/,输入用户名和密码,默认cluster/cluster
可以在此页面停止启动转换服务
五、carte服务 api调用
1、执行转换
curl -X POST -H "Authorization: Basic YWRtaW46UEBzc3cwcmQyMDIz" -H "Content-Type: application/x-www-form-urlencoded" --data "rep=local&trans=xxxxTrans&level=Basic" http://127.0.0.1:8080/kettle/executeTrans/ &
或者使用pan 工具
2、执行job
curl -X POST -H "Authorization: Basic YWRtaW46UEBzc3cwcmQyMDIz" -H "Content-Type: application/x-www-form-urlencoded" --data "rep=local&job=xxxxJob&level=Basic" http://127.0.0.1:8080/kettle/executeJob/ &
或者使用kitchen工具
cd /xxx/data-integration && sh kitchen.sh -rep=local -job=xxxxJob -dir=/ -level=Basic -carte=http://127.0.0.1:8080/cart -exec
注意:Authorization 计算方法: "Authorization: Basic base64(username:password)"
参考官方网址:
https://help.hitachivantara.com/Documentation/Pentaho/Data_Integration_and_Analytics/9.5/Products/Set_Up_a_Carte_Cluster
https://help.hitachivantara.com/Documentation/Pentaho/Data_Integration_and_Analytics/9.3/Developer_center/REST_API_Reference/Carte/020
标签:127.0,0.1,kettle,cluster,第二十四,常用命令,data,carte From: https://www.cnblogs.com/zjBoy/p/17913746.html