fcbai@fcbai-a4:~/software/hadoop/sqoop-1.4.7.bin__hadoop-2.6.0$ netstat -anp | grep 16000 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 127.0.1.1:16000 0.0.0.0:* LISTEN 355740/java tcp 0 0 127.0.1.1:16000 127.0.1.1:34983 ESTABLISHED 355740/java tcp 0 0 127.0.1.1:34983 127.0.1.1:16000 ESTABLISHED 356013/java
2022-11-23 18:14:48,001 ERROR hsqldb.HsqldbJobStorage: To use this version of Sqoop, you must downgrade your metadata schema. 2022-11-23 18:14:48,001 ERROR tool.JobTool: I/O error performing job operation: java.io.IOException: Invalid metadata version. at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.init(HsqldbJobStorage.java:202) at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.open(HsqldbJobStorage.java:161) at org.apache.sqoop.tool.JobTool.run(JobTool.java:289) 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:234) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243) at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
提示版本过低,去数据库看了下,sqoop会自动的创建一张SQOOP_ROOT表,对应的结构体如下:
mysql> show tables; +-----------------+ | Tables_in_sqoop | +-----------------+ | SQOOP_ROOT | +-----------------+ 1 row in set (0.00 sec)
mysql> desc SQOOP_ROOT; +----------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+-------+ | version | int | YES | MUL | NULL | | | propname | varchar(128) | NO | | NULL | | | propval | varchar(256) | YES | | NULL | | +----------+--------------+------+-----+---------+-------+
CREATE TABLE SQOOP_ROOT ( version INT, propname VARCHAR(128) NOT NULL, propval VARCHAR(256), CONSTRAINT SQOOP_ROOT_unq UNIQUE (version, propname) );
INSERT INTO SQOOP_ROOT VALUES( NULL, 'sqoop.hsqldb.job.storage.version', '0' );
如此便可彻底解决此问题,但是紧接着遇到第二个问题:
Failing this attempt.Diagnostics: [2022-11-23 10:58:09.606]Failed to download resource { { tos://fcbai/user/root/.staging/job_1666001145890_0023/libjars, 1669172288680, FILE, null },pending,[(container_1666001145890_0023_02_000001)],3171514525282685,DOWNLOADING} java.io.IOException: Resource tos://fcbai/user/root/.staging/job_1666001145890_0023/libjars changed on src filesystem - expected: "2022-11-23T10:58:08.680+0800", was: "2022-11-23T10:58:09.605+0800", current time: "2022-11-23T10:58:09.605+0800" For more detailed output, check the application tracking page: http://xxx:8088/cluster/app/application_1666001145890_0023 Then click on links to logs of each attempt. . Failing the application.
// Add these to the 'tmpjars' array, which the MR JobSubmitter // will upload to HDFS and put in the DistributedCache libjars. sb.append(StringUtils.arrayToString(localUrls.toArray(new String[0]))); conf.set(ConfigurationConstants.MAPRED_DISTCACHE_CONF_PARAM, sb.toString());