org.kitesdk.data.DatasetNotFoundException: Unknown dataset URI: hive:/xbdp/tb_machine. Check that JARs for hive datasets are on the classpath.

2016-06-20 16:57:37   作者:MangoCool   来源:MangoCool

执行sqoop命令将Oracle数据导入hive,并用Parquet作为存储:

./sqoop import --connect jdbc:oracle:thin:@192.168.20.19:1521:orcl --username xxx --password xxx --table TB_DIAG_MACHINE_RUN_TIME --fields-terminated-by '\t' --verbose -m 1 --hive-import --hive-database xbdp --hive-table tb_machine --as-parquetfile


出现报错:

16/06/20 15:50:35 ERROR sqoop.Sqoop: Got exception running Sqoop: org.kitesdk.data.DatasetNotFoundException: Unknown dataset URI: hive:/xbdp/tb_machine. Check that JARs for hive datasets are on the classpath.
org.kitesdk.data.DatasetNotFoundException: Unknown dataset URI: hive:/xbdp/tb_machine. Check that JARs for hive datasets are on the classpath.
        at org.kitesdk.data.spi.Registration.lookupDatasetUri(Registration.java:109)
        at org.kitesdk.data.Datasets.create(Datasets.java:228)
        at org.kitesdk.data.Datasets.create(Datasets.java:307)
        at org.apache.sqoop.mapreduce.ParquetJob.createDataset(ParquetJob.java:107)
        at org.apache.sqoop.mapreduce.ParquetJob.configureImportJob(ParquetJob.java:89)
        at org.apache.sqoop.mapreduce.DataDrivenImportJob.configureMapper(DataDrivenImportJob.java:108)
        at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:260)
        at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:673)
        at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:444)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:497)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:236)


解决方法:

配置用户的环境变量/etc/profile:

export HIVE_HOME=/home/hadoop/SW/hive-2.0.0
export HCAT_HOME=/home/hadoop/SW/hive-2.0.0/hcatalog


参考来源:

http://stackoverflow.com/questions/27861924/sqoop-import-as-parquetfile-with-cdh5

http://ingest.tips/2014/11/10/parquet-support-arriving-in-sqoop/

标签: Sqoop Hive Oracle error

分享:

上一篇org.apache.hadoop.yarn.exceptions.InvalidAuxServiceException: The auxService:mapreduce_shuffle does not exist

下一篇java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required

关于我

一个喜欢唱歌,热衷旅行,爱好电子产品的码农。没事,跟三五好友吼上几嗓子,约上几个背着行囊去露营或者宅在家里抱着孩子敲代码。

座右铭:当你的才华还撑不起你的野心的时候,你就应该静下心来学习,永不止步!

            人生之旅历途甚长,所争决不在一年半月,万不可因此着急失望,招精神之萎葸。


Copyright 芒果酷(mangocool.com) All rights reserved. 湘ICP备14019394号

免责声明:本网站部分文章转载其他媒体,意在为公众提供免费服务。如有信息侵犯了您的权益,可与本网站联系,本网站将尽快予以撤除。