Kettle7 java 远程执行Trans/Job
生活随笔
收集整理的這篇文章主要介紹了
Kettle7 java 远程执行Trans/Job
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
源碼:
遠程執行Trans:
public static void main(String[] args){String filename="E:\\Work\\JOB\\tag更新\\temp_tag2customer.ktr";try{KettleEnvironment.init();SlaveServer slaveServer = new SlaveServer("222i159","10.22.125.159","8081","cluster","cluster");TransMeta transMeta = new TransMeta(filename);TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();transExecutionConfiguration.setRemoteServer(slaveServer);String s = Trans.sendToSlaveServer(transMeta,transExecutionConfiguration,null,null);System.out.println(s);}catch (Exception e){e.printStackTrace();}}遠程執行Job:
public static void main(String[] args){String filename="E:\\Work\\JOB\\tag更新\\temp_tag2customer.kjb";try{KettleEnvironment.init();SlaveServer slaveServer = new SlaveServer("womai159","10.6.105.159","8081","cluster","cluster");JobMeta transMeta = new JobMeta(filename,null);JobExecutionConfiguration jobExecutionConfiguration = new JobExecutionConfiguration();jobExecutionConfiguration.setRemoteServer(slaveServer);String s = Job.sendToSlaveServer(transMeta,jobExecutionConfiguration,null,null);System.out.println(s);}catch (Exception e){e.printStackTrace();}}在spoon界面顯示為:
其中遠程機器:
轉載于:https://my.oschina.net/ilovetao/blog/1576746
總結
以上是生活随笔為你收集整理的Kettle7 java 远程执行Trans/Job的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 骡夫电商地址
- 下一篇: CentOS学习笔记(一):中文语言包及