Forum Stats

  • 3,769,586 Users
  • 2,252,984 Discussions
  • 7,875,109 Comments

Discussions

hive table is not accessible by oracle big data connector

User_FJW9T
User_FJW9T Member Posts: 1 Red Ribbon
edited Jan 10, 2018 4:32PM in Big Data Connectors/Hadoop

Hi All,

I am trying to install big data connector for hive and in the process i am trying to create the external table.Here is my env variable set for the oracle user

CLASSPATH=:/usr/lib/hive/lib:/temp_for_clone/hadoop/orahdfs-3.8.0/jlib/*:/usr/lib/hadoop/lib:/usr/lib/hadoop/lib/native:/temp_for_clone/hadoop/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.ja

CVS_RSH=ssh

EDITOR=vi

G_BROKEN_FILENAMES=1

HADOOP_CLASSPATH=/usr/lib/hadoop/lib/*:/temp_for_clone/hadoop/orahdfs-3.8.0/jlib/*:/usr/lib/hive/lib/*:/temp_for_clone/hadoop/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.jar:/etc/hive/conf

HADOOP_CONF_DIR=/usr/lib/hadoop/etc/hadoop

HADOOP_HOME=/usr/lib/hadoop

HADOOP_PREFIX=/usr/lib/hadoop

HISTSIZE=64

HIVE_CONF_DIR=/usr/lib/hive/conf

HIVE_HOME=/usr/lib/hive

HOME=/opt/home/oracle

HOSTNAME=devdb03

INPUTRC=/etc/inputrc

JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.141.x86_64/jre

LANG=en_US.UTF-8

LD_LIBRARY_PATH=/u01/app/oracle/11.2.0.3/lib:/usr/lib:/u01/app/oracle/11.2.0.3/ctx/lib

LESSOPEN=||/usr/bin/lesspipe.sh %s

LOADEDMODULES=

Here is my error while running :

hadoop jar $OSCH_HOME/jlib/orahdfs.jar oracle.hadoop.exttab.ExternalTable -Doracle.hadoop.exttab.printStackTrace=true -conf wls.xml -createTable

oracle.hadoop.exttab.ExternalTableException: Hive error: default.wlsserver> table not found

at oracle.hadoop.exttab.hive.HiveSource.initialize(HiveSource.java:239)

at oracle.hadoop.exttab.hive.HiveSource.isPartitioned(HiveSource.java:315)

at oracle.hadoop.exttab.ExternalTable.doCreateTable(ExternalTable.java:3117)

at oracle.hadoop.exttab.ExternalTable.run(ExternalTable.java:5108)

at oracle.hadoop.exttab.ExternalTable.run(ExternalTable.java:5190)

at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

at oracle.hadoop.exttab.ExternalTable.main(ExternalTable.java:5306)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

at org.apache.hadoop.util.RunJar.main(RunJar.java:136)

However table is present in hive:

hive> desc default.wlsserver;

OK

time_stamp          string

category            string

type                string

servername          string

code                string

msg                  string

Time taken: 0.078 seconds, Fetched: 6 row(s)

Metastore also shows table is present.

mysql> select * from TBLS;

+--------+-------------+-------+------------------+-------+-----------+-------+-----------+---------------+--------------------+--------------------+----------------+

| TBL_ID | CREATE_TIME | DB_ID | LAST_ACCESS_TIME | OWNER | RETENTION | SD_ID | TBL_NAME  | TBL_TYPE      | VIEW_EXPANDED_TEXT | VIEW_ORIGINAL_TEXT | LINK_TARGET_ID |

+--------+-------------+-------+------------------+-------+-----------+-------+-----------+---------------+--------------------+--------------------+----------------+

|      1 |  1507844630 |     1 |                0 | hdfs  |         0 |     1 | wlsserver | MANAGED_TABLE | NULL               | NULL               |           NULL |

+--------+-------------+-------+------------------+-------+-----------+-------+-----------+---------------+--------------------+--------------------+----------------+

1 row in set (0.00 sec)

Thanks in advance for helping.

Regards,

Kamal

mysql> EXIT

Mannamal-Oracle

Answers

This discussion has been closed.