AnsweredAssumed Answered

Error initializing Hive metadata provider

Question asked by narahari on Feb 15, 2018
Latest reply on Feb 16, 2018 by maprcommunity

Hi All

 

I am trying to setup Replication from Oracle Database to Hive Database using Oracle's golden gate tool.  When I start replicat process on Target (Hive) I am getting below error.  Please appreciate for help.

 

Oracle Database Version 11.2.0.4 (Source)

MapR Version : 5.1

Hive version : 1.2  (Target)

Source Oracle Golden Gate Version:   12.2.0.2.2

Target Oracle Golden Gate Version:  12.3.0.1.0

 

Hive_mdp_hdfs.properties

====================================================================================

#Handler Properties
gg.handler.hdfs.type=hdfs
gg.handler.hdfs.rootFilePath=/mapr/<cluster name>/<Hive DB Location>
gg.handler.hdfs.format=delimitedtext
gg.handler.hdfs.format.includeColumnNames=true
gg.handler.hdfs.includeTokens=false

gg.handler.hdfs.mode=tx


#Hive Metadata Provider Properties
gg.mdp.type=hive
gg.mdp.connectionUrl=jdbc:hive2://localhost:10000/default
gg.mdp.driverClassName=org.apache.hive.jdbc.HiveDriver


goldengate.userexit.timestamp=utc
goldengate.userexit.writers=javawriter
javawriter.stats.display=TRUE
javawriter.stats.full=TRUE

gg.log=log4j
gg.log.level=INFO

gg.report.time=30sec

gg.classpath=dirprm/:/opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/common/*:/opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/common/lib/*:/opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/hdfs/*:/opt/mapr/hadoop/hadoop-2.7.0/etc/hadoop/*:/opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/mapreduce/*:/opt/mapr/hive/hive-1.2/lib/*:/opt/mapr/hive/hive-1.2/hcatalog/share/hcatalog/*:/opt/mapr/hive/hive-1.2/hcatalog/share/webhcat/java-client/*:/opt/mapr/hive/hive-1.2/conf/*:/mapr/hdp1.schneider.com/dev/ods/ods/goldengate/ojdbc6.jar:/opt/mapr/hadoop/hadoop-2.7.0/share/hadoop/yarn/*

 

gg.report.time=30sec
javawriter.bootoptions=-Xmx512m -Xms32m -Djava.class.path=.:ggjava/ggjava.jar:./dirprm

========================================================================================

 

 

Error:

======================================================================================

INFO 2018-02-15 11:09:51,254 [main] Memory at Initialization : Max: 455.50 MB, Total: 56.50 MB, Free: 23.24 MB, Used: 33.26 MB
ERROR 2018-02-15 11:09:51,521 [main] Error initializing Hive metadata provider.
org.apache.hive.service.cli.HiveSQLException: Failed to open new session: java.lang.RuntimeException: java.lang.RuntimeException: java.io.IOException: Error getting user info for current user, anonymous
        at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:257)
        at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:248)
        at org.apache.hive.jdbc.HiveConnection.openSession(HiveConnection.java:590)
        at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:193)
        at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at oracle.goldengate.mdp.hive.HiveMetaDataProvider.init(HiveMetaDataProvider.java:191)
        at oracle.goldengate.datasource.metadata.provider.DsMDP.initMDP(DsMDP.java:78)
        at oracle.goldengate.datasource.conf.DsHandler.getDataSourceListener(DsHandler.java:258)
        at oracle.goldengate.datasource.factory.DataSourceFactory.getHandlers(DataSourceFactory.java:264)
        at oracle.goldengate.datasource.factory.DataSourceFactory.getDataSource(DataSourceFactory.java:157)
        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.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1051)
        at oracle.goldengate.datasource.DataSourceLauncher.<init>(DataSourceLauncher.java:161)
        at oracle.goldengate.datasource.UserExitMain.main(UserExitMain.java:108)

================================================================================

Outcomes