1.将windows环境中产生的ktr文件上传到linux环境中执行
[root@lx02 data-integration]# ./pan.sh -file=/opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integration/workspace/hivetorizhi.ktr >> /opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integration/workspace/log/kettle5.log
2.查看执行文件
[root@lx02 data-integration]# cat /opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integration/workspace/log/kettle.log
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
11:09:27,192 INFO [KarafBoot] Checking to see if org.pentaho.clean.karaf.cache is enabled
11:09:28,727 INFO [KarafInstance]
*******************************************************************************
*** Karaf Instance Number: 1 at /opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integ ***
*** ration/./system/karaf/caches/pan/data-1 ***
*** FastBin Provider Port:52901 ***
*** Karaf Port:8802 ***
*** OSGI Service Port:9051 ***
*******************************************************************************
七月 17, 2018 11:09:37 上午 org.apache.karaf.main.Main$KarafLockCallback lockAquired
信息: Lock acquired. Setting startlevel to 100
2018-07-17 11:11:45.388:INFO:oejs.Server:jetty-8.1.15.v20140411
2018-07-17 11:11:45.510:INFO:oejs.AbstractConnector:Started [email protected]:9051
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/core
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/configuration/beans
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/configuration/parameterized-types
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/configuration/security
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://schemas.xmlsoap.org/wsdl/
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://www.w3.org/2005/08/addressing
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://schemas.xmlsoap.org/ws/2004/08/addressing
七月 17, 2018 11:11:52 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-management (152) [org.apache.cxf.management.InstrumentationManager]
七月 17, 2018 11:11:53 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-wsdl (189) [org.apache.cxf.wsdl.WSDLManager]
七月 17, 2018 11:11:53 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-ws-policy (203) [org.apache.cxf.ws.policy.PolicyEngine, org.apache.cxf.policy.PolicyDataEngine, org.apache.cxf.ws.policy.AssertionBuilderRegistry, org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry, org.apache.cxf.ws.policy.PolicyBuilder, org.apache.cxf.ws.policy.PolicyAnnotationListener, org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider, org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry, org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder, org.apache.cxf.ws.policy.attachment.external.URIDomainExpressionBuilder, org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider, org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder, org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider]
七月 17, 2018 11:11:53 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (156) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/transports/http/configuration
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-bindings-soap (192) [org.apache.cxf.binding.soap.SoapBindingFactory, org.apache.cxf.binding.soap.SoapTransportFactory]
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/jaxrs
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/jaxrs-client
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-bindings-xml (191) [org.apache.cxf.binding.xml.XMLBindingFactory, org.apache.cxf.binding.xml.wsdl11.XMLWSDLExtensionLoader]
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/bindings/soap
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/simple
七月 17, 2018 11:11:54 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxws (194) [org.apache.cxf.jaxws.context.WebServiceContextResourceResolver]
11:11:57,763 ERROR [KarafLifecycleListener] The Kettle Karaf Lifecycle Listener failed to execute properly after waiting for 100 seconds. Releasing lifecycle hold, but some services may be unavailable.
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/jaxws
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/binding/coloc
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-local (199) [org.apache.cxf.transport.local.LocalTransportFactory]
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-bindings-object (200) [org.apache.cxf.binding.object.ObjectBindingFactory]
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/blueprint/binding/object
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/policy
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://www.w3.org/ns/ws-policy
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://www.w3.org/2006/07/ws-policy
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://schemas.xmlsoap.org/ws/2004/09/policy
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://www.w3.org/2000/09/xmldsig#
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-ws-addr (220) [org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder, org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder, org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider, org.apache.cxf.ws.addressing.impl.AddressingWSDLExtensionLoader, org.apache.cxf.ws.addressing.WSAddressingFeature$WSAddressingFeatureApplier, org.apache.cxf.ws.addressing.MAPAggregator$MAPAggregatorLoader]
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/ws/addressing
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-ws-security (222) [org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader, org.apache.cxf.ws.security.cache.CacheCleanupListener]
七月 17, 2018 11:11:57 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-ws-rm (224) [org.apache.cxf.ws.rm.RMManager, org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider, org.apache.cxf.ws.rm.policy.RM10AssertionBuilder, org.apache.cxf.ws.rm.policy.RM12AssertionBuilder, org.apache.cxf.ws.rm.policy.WSRMP12PolicyLoader, org.apache.cxf.ws.rm.policy.MC11PolicyLoader, org.apache.cxf.ws.rm.policy.RSPPolicyLoader]
七月 17, 2018 11:11:58 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://cxf.apache.org/ws/rm/manager
2018/07/17 11:11:58 - Pan - 开始运行.
七月 17, 2018 11:11:58 上午 org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
信息: Registered blueprint namespace handler for http://schemas.xmlsoap.org/ws/2005/02/rm/policy
七月 17, 2018 11:11:59 上午 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
信息: Adding the extensions from bundle org.apache.cxf.cxf-rt-javascript (225) [org.apache.cxf.javascript.JavascriptServerListener]
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) -
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) - Unable to load database connection info from XML node
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) -
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) - Unable to create new database interface
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) -
2018/07/17 11:12:00 - SharedObjects (/root/.kettle/shared.xml) - database type with plugin id [HIVE2] couldn't be found!
处理过程停止,由于错误:
错误从XML文件读取转换
错误从XML文件读取转换
Unable to load database connection info from XML node
Unable to create new database interface
database type with plugin id [HIVE2] couldn't be found!
org.pentaho.di.core.exception.KettleXMLException:
错误从XML文件读取转换
错误从XML文件读取转换
Unable to load database connection info from XML node
Unable to create new database interface
database type with plugin id [HIVE2] couldn't be found!
at org.pentaho.di.trans.TransMeta.loadXML(TransMeta.java:3402)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2758)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2710)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2687)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2667)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2632)
at org.pentaho.di.trans.TransMeta.(TransMeta.java:2595)
at org.pentaho.di.pan.Pan.main(Pan.java:397)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.di.core.exception.KettleXMLException:
错误从XML文件读取转换
Unable to load database connection info from XML node
Unable to create new database interface
database type with plugin id [HIVE2] couldn't be found!
at org.pentaho.di.trans.TransMeta.loadXML(TransMeta.java:3384)
... 12 more
Caused by: org.pentaho.di.core.exception.KettleXMLException:
Unable to load database connection info from XML node
Unable to create new database interface
database type with plugin id [HIVE2] couldn't be found!
at org.pentaho.di.core.database.DatabaseMeta.(DatabaseMeta.java:1013)
at org.pentaho.di.trans.TransMeta.loadXML(TransMeta.java:2976)
... 12 more
Caused by: org.pentaho.di.core.exception.KettleXMLException:
Unable to create new database interface
database type with plugin id [HIVE2] couldn't be found!
at org.pentaho.di.core.database.DatabaseMeta.(DatabaseMeta.java:977)
... 13 more
Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
database type with plugin id [HIVE2] couldn't be found!
at org.pentaho.di.core.database.DatabaseMeta.findDatabaseInterface(DatabaseMeta.java:584)
at org.pentaho.di.core.database.DatabaseMeta.getDatabaseInterface(DatabaseMeta.java:558)
at org.pentaho.di.core.database.DatabaseMeta.(DatabaseMeta.java:974)
... 13 more
```
```
SharedObjects (/root/.kettle/shared.xml) - Unable to load database connection info from XML node
报错分析:
1.kettle无法解析连接类型中的hive2类型
2../kettle中没有数据库的连接信息
因此:
1.将windows中的C:/user/**/.kettle文件夹上传至linux环境的/root路径下
2.查看plugin.properties文件中active.hadoop.configuration的值是什么,就将windows环境中data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\cdh510文件夹 上传到linux环境中相应的文件路径下
再次执行ktr文件,报错:
018/07/17 14:13:58 - Pan - 开始运行.
2018/07/17 14:13:59 - hivetorizhi - 为了转换解除补丁开始 [hivetorizhi]
2018/07/17 14:14:05 - 表输入.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : An error occurred, processing will be stopped:
2018/07/17 14:14:05 - 表输入.0 - Error occurred while trying to connect to the database
2018/07/17 14:14:05 - 表输入.0 -
2018/07/17 14:14:05 - 表输入.0 - Error connecting to database: (using class org.apache.hive.jdbc.HiveDriver)
2018/07/17 14:14:05 - 表输入.0 - No suitable driver found for jdbc:hive2://192.168.50.248:10000/default
2018/07/17 14:14:05 - 表输入.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : 错误初始化步骤[表输入]
2018/07/17 14:14:05 - hivetorizhi - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : 步骤 [表输入.0] 初始化失败!
2018/07/17 14:14:05 - 表输入.0 - Finished reading query, closing connection.
不能准备和初始化这个转换
说明kettle加载不到hive的驱动包。解决办法:
去data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\cdh510\lib路径下将hive*-cdh5.10.0.jar复制到data-integration\lib路径下,仍然报错。
本次测试连接到cdh是5.11版本,怀疑是jar的版本不对,统一将hive*-cdh5.10.0.jar,更换为hive-*-cdh5.11.0.jar。执行ktr任然报错。
将hive原生安装包中的hive-jdbc-1.1.0.jar上传是data-integration\plugins\pentaho-big-data-plugin\hadoop-configurations\cdh510\lib路径,执行失败。
但是将hive-jdbc-1.2.1.jar或者hive-jdbc-1.2.2.jar上传上去,就可以执行成功,至于为何,不太明白。
2018/07/19 17:07:59 - Pan - 开始运行.
2018/07/19 17:07:59 - hivetorizhi - 为了转换解除补丁开始 [hivetorizhi]
七月 19, 2018 5:08:00 下午 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be /marketplace
七月 19, 2018 5:08:00 下午 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be /lineage
七月 19, 2018 5:08:00 下午 org.apache.cxf.endpoint.ServerImpl initDestination
信息: Setting the server's publish address to be /i18n
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integration/launcher/../lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cm/hadoop/pdi-ce-7.1.0.0-12/data-integration/plugins/pentaho-big-data-plugin/lib/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
2018/07/19 17:08:00 - 表输入.0 - Finished reading query, closing connection.
2018/07/19 17:08:00 - 写日志.0 -
2018/07/19 17:08:00 - 写日志.0 - ------------> 行号 1------------------------------
2018/07/19 17:08:00 - 写日志.0 - id = 1
2018/07/19 17:08:00 - 写日志.0 - name = 23
2018/07/19 17:08:00 - 写日志.0 -
2018/07/19 17:08:00 - 写日志.0 - ====================
2018/07/19 17:08:00 - 写日志.0 - 完成处理 (I=0, O=0, R=1, W=1, U=0, E=0)
2018/07/19 17:08:01 - 表输入.0 - 完成处理 (I=1, O=0, R=0, W=1, U=0, E=0)
2018/07/19 17:08:01 - Pan - 完成!
2018/07/19 17:08:01 - Pan - 开始=2018/07/19 17:07:59.418, 停止=2018/07/19 17:08:01.020
2018/07/19 17:08:01 - Pan - 1 秒后处理结束.
2018/07/19 17:08:01 - hivetorizhi -
2018/07/19 17:08:01 - hivetorizhi - 进程 表输入.0 成功结束, 处理了 1 行. ( 1 行/秒)
2018/07/19 17:08:01 - hivetorizhi - 进程 写日志.0 成功结束, 处理了 1 行. ( 1 行/秒)