一、创建docker image
二、创建容器
注:创建image时需要确保/opt/kettle/data-integration/.kettle/目前已创建
docker run --name kettle -d -p 18080:18080
-v /opt/kettle/kettle_job:/opt/kettle/kettle_job
-v /opt/kettle/conf/kettle.properties:/opt/kettle/data-integration/.kettle/kettle.properties
-v /opt/kettle/conf/carte.xml:/opt/kettle/data-integration/carte.xml
mydocker/kettle
二、配置carte
kettle 的配置文件在这里 /opt/kettle/data-integration/.kettle/kettle.properties
三、常见错误
1.[Fatal Error] :324:13: Invalid byte 1 of 1-byte UTF-8 sequence.
用ue打开spoon.bat,在if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS="-Xms1024m" "-Xmx2048m" "-XX:MaxPermSize=256m"?
后面加了"-Dfile.encoding=UTF-8",再重启即可解决乱码。
2.Carte上面的作业自动丢失的问题
修改kettle.properties中KETTLE_CARTE_OBJECT_TIMEOUT_MINUTES,1440分钟(1天)为一年。
<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>IP地址</hostname>
<port>开放的端口</port>
<master>Y</master>
<username>cluster</username>
<password>cluster</password>
</slaveserver>
<max_log_lines>1000</max_log_lines>
<max_log_timeout_minutes>1440</max_log_timeout_minutes>
<object_timeout_minutes>0</object_timeout_minutes>
</slave_config>
|