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.

sqoop job is failing with --query and where clause and Hcatalog storage stang

Highlighted

sqoop job is failing with --query and where clause and Hcatalog storage stang

New Contributor

Hi,

My Sqoop job is as follows

sqoop job --create KHL_SOE_FINANCIAL_TRAN_JOB -- import --options-file '/home/hdfs/sqoopimport/DBConnections/connectionDetails.txt' --password-file 'hdfs://ssehdp101.metmom.mmih.biz:8020/passwd/psw.txt' --query "select * from ad.soe_financial_tran where ACCOUNT_CURRENCY_CODE in ('GHS', 'UGX') and \$CONDITIONS" -m 1 --incremental lastmodified --check-column POSTED_AT --last-value '2018-08-02 21:11:31.759' --hcatalog-home /usr/hdp/current/hive-webhcat --hcatalog-database SNDPD --hcatalog-table SND_SOE_FINANCIAL_TRAN --hcatalog-storage-stanza 'stored as orcfile'

If I run this job Im getting following error.

ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException java.lang.NullPointerException at org.apache.hadoop.fs.FileSystem.fixRelativePart(FileSystem.java:2254) at org.apache.hadoop.hdfs.DistributedFileSystem.fixRelativePart(DistributedFileSystem.java:2512) at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1437) at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1447) at org.apache.sqoop.tool.ImportTool.initIncrementalConstraints(ImportTool.java:320) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:498) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:615) at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:243) at org.apache.sqoop.tool.JobTool.run(JobTool.java:298) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:225) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.main(Sqoop.java:243)

Connection details are correct, If I run with out sqoop job I can able to import.

Thanks in Advance..

3 REPLIES 3

Re: sqoop job is failing with --query and where clause and Hcatalog storage stang

Expert Contributor
@Ravikiran Dasari

It seems like this could be a permission error. Confirm the user that is executing the sqoop command has proper permissions to access sqoop command parameter files.

Good luck, and if this answer helps, please choose ACCEPT.

Re: sqoop job is failing with --query and where clause and Hcatalog storage stang

New Contributor

I can able run this with out sqoop job and with out ACCOUNT_CURRENCY_CODE in ('GHS', 'UGX') this condition also.surly its not permission issues.

Re: sqoop job is failing with --query and where clause and Hcatalog storage stang

New Contributor

Sqoop is meant to “Fail speedy” unless you use Oozie or every other workflow essay help engine to configure movements to take upon a failure. a normal Sqoop process this is eating information from a supply database into HDFS will copy the information to a target directory. The copied report goes to be deleted if sqoop fails without completing.

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