Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

While using Sqoop Import using HCatalog : Encountered IOException running import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found)

Highlighted

While using Sqoop Import using HCatalog : Encountered IOException running import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found)

I am using Java to call on Sqoop Function to load Oracle data to Hive tables. This is the full log of the error and the Java command used:

val tool:SqoopTool = new ImportTool()

val args: Array[String] = Array("--connect", sqoop_url, "--username", sqoop_username, "--password", sqoop_password, "--query", "select * from (select * from testtbl where rmwb_team_role='PFAM') a where $CONDITIONS", "--hcatalog-database", "default", "--hcatalog-table", "test_inc_tbl","--hive-partition-key","rmwb_team_role","--hive-partition-value","PFAM", "--verbose", "-m", "1")

var options:SqoopOptions = new SqoopOptions(); try { options = tool.parseArguments(args, null, options, false); tool.validateOptions(options); } catch { case e: Exception => { System.err.println(e.getMessage()); //throw new SqoopException(e.message); } }

tool.run(options);

FULL ERROR LOG:

2017-07-20 15:17:50.0693 ERROR [main] (ImportTool.java:613) [org.apache.sqoop.tool.ImportTool] - Encountered IOException running import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found) at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:97) at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:51) at org.apache.sqoop.mapreduce.hcat.SqoopHCatUtilities.configureHCat(SqoopHCatUtilities.java:343) at org.apache.sqoop.mapreduce.hcat.SqoopHCatUtilities.configureImportOutputFormat(SqoopHCatUtilities.java:802) at org.apache.sqoop.mapreduce.ImportJobBase.configureOutputFormat(ImportJobBase.java:98) at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:259) at org.apache.sqoop.manager.SqlManager.importQuery(SqlManager.java:729) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:499) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605) at master.invoker.tester$.main(tester.scala:173) at master.invoker.tester.main(tester.scala) Caused by: NoSuchObjectException(message:default.test_inc_tbl table not found) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table_core(HiveMetaStore.java:1815) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table(HiveMetaStore.java:1785) 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.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) at com.sun.proxy.$Proxy7.get_table(Unknown Source) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTable(HiveMetaStoreClient.java:1214) 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.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:152) at com.sun.proxy.$Proxy8.getTable(Unknown Source) at org.apache.hive.hcatalog.common.HCatUtil.getTable(HCatUtil.java:180) at org.apache.hive.hcatalog.mapreduce.InitializeInput.getInputJobInfo(InitializeInput.java:105) at org.apache.hive.hcatalog.mapreduce.InitializeInput.setInput(InitializeInput.java:86) at org.apache.hive.hcatalog.mapreduce.HCatInputFormat.setInput(HCatInputFormat.java:95) ... 10 more

2 REPLIES 2
Highlighted

Re: While using Sqoop Import using HCatalog : Encountered IOException running import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found)

@Al John Mangahas

Error "import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found)" directly reports the table to be not found under 'default' database.

Login to Hcatalog using "hcat" and try 'show create table default.test_inc_tbl'.

Highlighted

Re: While using Sqoop Import using HCatalog : Encountered IOException running import job: java.io.IOException: NoSuchObjectException(message:default.test_inc_tbl table not found)

Hi Sindhu,

hcat -e "show create table default.test_inc_tbl;" WARNING: Use "yarn jar" to launch YARN applications. FAILED: SemanticException Operation not supported.

I am having this error when I am trying to execute the statement. same issue occured when I am trying to do a SELECT but when I am running the command in sqoop cli it running well.

Don't have an account?
Coming from Hortonworks? Activate your account here