IT专家遇到运行导入作业的IOException javaioIOException javac返回的错误Word文件下载.docx
《IT专家遇到运行导入作业的IOException javaioIOException javac返回的错误Word文件下载.docx》由会员分享,可在线阅读,更多相关《IT专家遇到运行导入作业的IOException javaioIOException javac返回的错误Word文件下载.docx(18页珍藏版)》请在冰豆网上搜索。
![IT专家遇到运行导入作业的IOException javaioIOException javac返回的错误Word文件下载.docx](https://file1.bdocx.com/fileroot1/2022-10/11/b662efcf-d62a-4889-b684-880e9bf4246f/b662efcf-d62a-4889-b684-880e9bf4246f1.gif)
javacIamtryingtorunasimplesqoopimportprogramusingJAVA.
我正在尝试使用JAVA运行一个简单的sqoop导入程序。
MyProgram:
我的计划:
Stringdriver=“com.vertica.Driver”;
Configurationconfig=newConfiguration();
config.addResource(newPath(“/../../../mapred-site.xml”));
config.addResource(new
Path(“/../../../core-site.xml”));
config.addResource(newPath(“/../../../hdfs-site.xml”));
SqoopOptionsoptions=newSqoopOptions();
options.setConnectString(connection_string);
options.setDriverClassName(driver);
options.setUsername(username);
options.setPassword(“xxxxxxxxxxxxx”);
options.setTargetDir(directorypath);
options.setFetchSize(0);
options.setSqlQuery(“SELECT123456asrunid,“+“business_date“+“FROM
database.table“+“WHEREbusiness_date=\’20140922\’“+“AND
instrument_id=1037894110378941“+“AND$CONDITIONS”);
intret=new
ImportTool().run(options);
System.out.println(“ReturnVal:
“+ret);
Ihavethefollowing
error
我有以下错误
15/02/0302:
26:
23WARNsqoop.ConnFactory:
$SQOOP_CONF_DIRhasnotbeenset
intheenvironment.Cannotcheckforadditionalconfiguration.15/02/0302:
23WARN
sqoop.ConnFactory:
Parameter--driverissettoanexplicitdriverhoweverappropriate
connectionmanagerisnotbeingset(via--connection-manager).Sqoopisgoingtofall
backtoorg.apache.sqoop.manager.GenericJdbcManager.Pleasespecifyexplicitlywhich
connectionmanagershouldbeusednexttime.15/02/0302:
23INFOtool.CodeGenTool:
Beginningcodegeneration15/02/0302:
24INFOmanager.SqlManager:
ExecutingSQL
statement:
SELECT123456asrunid,business_dateFROM
silverscreen_qa.SS_INSTRUMENTWHEREbusiness_date=‘20140922’AND
instrument_id=1037894110378941AND(1=0)15/02/0302:
24INFO
manager.SqlManager:
ExecutingSQLstatement:
SELECT123456asrunid,business_date
FROMsilverscreen_qa.SS_INSTRUMENTWHEREbusiness_date=‘20140922’AND
orm.CompilationManager:
$HADOOP_MAPRED_HOMEisnotset/tmp/sqoop-
sha0_dev/compile/bda7671a1a4e5e172248f2497654d2c1/QueryResult.java:
11:
error:
packagecom.cloudera.sqoop.libdoesnotexistimport
com.cloudera.sqoop.lib.JdbcWritableBridge;
/tmp/sqoop-
12:
com.cloudera.sqoop.lib.DelimiterSet;
13:
com.cloudera.sqoop.lib.FieldFormatter;
14:
com.cloudera.sqoop.lib.RecordParser;
15:
com.cloudera.sqoop.lib.BooleanParser;
16:
com.cloudera.sqoop.lib.BlobRef;
17:
com.cloudera.sqoop.lib.ClobRef;
18:
com.cloudera.sqoop.lib.LargeObjectLoader;
19:
com.cloudera.sqoop.lib.SqoopRecord;
37:
cannotfindsymbolpublicclassQueryResultextendsSqoopRecordimplements
DBWritable,Writable{symbol:
classSqoopRecord/tmp/sqoop-
81:
cannotfindsymbolpublicvoidloadLargeObjects(LargeObjectLoader__loader)symbol:
classLargeObjectLoaderlocation:
classQueryResult/tmp/sqoop-
119:
cannotfindsymbolprivatefinalDelimiterSet__outputDelimiters=new
DelimiterSet((char)44,(char)10,(char)0,(char)0,false);
symbol:
classDelimiterSet
location:
123:
cannotfindsymbolpublicStringtoString(DelimiterSetdelimiters){symbol:
class
DelimiterSetlocation:
129:
cannotfindsymbolpublicStringtoString(DelimiterSetdel