1 Reply Latest reply on Dec 18, 2016 5:35 PM by dvohra21

    Create External Table on Exadata to show data in Hadoop

    1948946

      Hello everyone.

       

      I had installed and configured everything I need to run the following command:

       

      hadoop jar $OSCH_HOME/jlib/orahdfs.jar oracle.hadoop.exttab.ExternalTable -D oracle.hadoop.exttab.tableName=<exa-ext-table-name> -D oracle.hadoop.exttab.sourceType=hive -D oracle.hadoop.exttab.locationFileCount=2 -D oracle.hadoop.exttab.hive.tableName=<hive-table-name> -D oracle.hadoop.exttab.hive.databaseName=<hive-db-name> -D oracle.hadoop.exttab.defaultDirectory=EXTERNAL_TABLE_DIR -D oracle.hadoop.connection.url='jdbc:oracle:thin:@//<server-name>:1521/<service-name>' -D oracle.hadoop.connection.user=<myuser> -D oracle.hadoop.exttab.printStackTrace=true -createTable

       

      but I got the following error:

       

      Oracle SQL Connector for HDFS Release 3.6.0 - Production

       

       

      Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.

       

       

      [Enter Database Password:]

      java.lang.NullPointerException

              at oracle.jdbc.driver.T4CConnection.updateSessionProperties(T4CConnection.java:1862)

              at oracle.jdbc.driver.T4CTTIkvarr.unmarshal(T4CTTIkvarr.java:119)

              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:515)

              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)

              at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:416)

              at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:825)

              at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:596)

              at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:715)

              at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:385)

              at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:30)

              at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:564)

              at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:303)

              at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:230)

              at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:175)

              at oracle.hadoop.utils.DBUtils$ConnectionBuilder.getConnection(DBUtils.java:438)

              at oracle.hadoop.utils.DBUtils$ConnectionBuilder.getConnection(DBUtils.java:331)

              at oracle.hadoop.exttab.ExternalTable.getConnection(ExternalTable.java:1020)

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

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

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

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

              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:497)

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

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

       

      I have the kerberos ticket and it is valid.

      JAVA_HOME and all jar paths are ok.

      I can run a query against hive from exadata by using hive cli.

      When I enter the oracle user's password wrong, above command gives a clear ORA eror.

       

      but when I set everything properly, then I fail.

       

      There must be something missing.