Sqoop导入失败:超出了拆分的最大块位置

时间:2014-11-03 09:40:22

标签: sqoop

在使用couchbase插件1.1执行Sqoop导入时,导入会发出警告

警告:

Max block location exceeded for split

错误:

Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:38:21 INFO mapreduce.Job:  map 100% reduce 0%
  • Sqoop 1.4.5-cdh5.2.0
  • Hadoop 2.3.0-cdh5.1.0
  • Couchbase hadoop插件1.1

警告和错误似乎有关。因此我做了以下更改:

我尝试从命令行更改max split size的值:

-D mapred.max.split.size=1048576
-D mapreduce.job.max.split.locations=100

日志:

[root@cinthrweb02 hail]# sqoop import -D  mapreduce.input.fileinputformat.split.maxsize=1048576 -D mapreduce.job.max.split.locations=256 --connect url -P --table DUMP


Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
14/11/03 02:57:16 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.2.0
Enter password:
14/11/03 02:57:20 INFO tool.CodeGenTool: Beginning code generation
14/11/03 02:57:20 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/lib/hadoop-mapreduce
Note: /tmp/sqoop-root/compile/4f331caf65f98ef369053846ba619981/DUMP.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
14/11/03 02:57:21 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/4f331caf65f98ef369053846ba619981/DUMP.jar
14/11/03 02:57:21 INFO mapreduce.ImportJobBase: Beginning import of DUMP
14/11/03 02:57:21 INFO Configuration.deprecation: mapred.job.tracker is deprecated. Instead, use mapreduce.jobtracker.address
14/11/03 02:57:22 INFO Configuration.deprecation: mapred.jar is deprecated. Instead, use mapreduce.job.jar
14/11/03 02:57:22 INFO Configuration.deprecation: mapred.map.tasks is deprecated. Instead, use mapreduce.job.maps
14/11/03 02:57:22 WARN util.Jars: No such class couchbase doesn't use a jdbc driver available.
14/11/03 02:57:22 INFO client.RMProxy: Connecting to ResourceManager at cinthrweb01.sling.com/10.84.80.157:8032
14/11/03 02:57:24 INFO Configuration.deprecation: mapreduce.map.class is deprecated. Instead, use mapreduce.job.map.class
14/11/03 02:57:24 INFO client.CouchbaseConnection: Added {QA sa=/10.84.80.140:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
14/11/03 02:57:24 INFO client.CouchbaseConnection: Added {QA sa=/10.84.80.141:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
14/11/03 02:57:24 INFO client.CouchbaseConnection: Added {QA sa=/10.84.80.142:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect queue
14/11/03 02:57:24 INFO client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@757753a8
14/11/03 02:57:24 INFO client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@6d1576d7
14/11/03 02:57:24 INFO client.CouchbaseConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@6e681db8
14/11/03 02:57:24 INFO client.CouchbaseConnection: Shut down Couchbase client
14/11/03 02:57:24 INFO mapreduce.JobSubmitter: number of splits:4
14/11/03 02:57:24 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1409339839617_0107
14/11/03 02:57:24 INFO impl.YarnClientImpl: Submitted application application_1409339839617_0107
14/11/03 02:57:24 INFO mapreduce.Job: The url to track the job: http://cinthrweb01.sling.com:8088/proxy/application_1409339839617_0107/
14/11/03 02:57:24 INFO mapreduce.Job: Running job: job_1409339839617_0107
14/11/03 02:57:31 INFO mapreduce.Job: Job job_1409339839617_0107 running in uber mode : false
14/11/03 02:57:31 INFO mapreduce.Job:  map 0% reduce 0%
14/11/03 02:57:36 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000000_0, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:37 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000002_0, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:37 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000003_0, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
Container killed by the ApplicationMaster.
Container killed on request. Exit code is 143
Container exited with a non-zero exit code 143

14/11/03 02:57:37 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000001_0, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:40 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000000_1, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:42 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000003_1, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:42 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000002_1, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:42 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000001_1, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:46 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000000_2, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:46 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000002_2, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:47 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000003_2, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:48 INFO mapreduce.Job: Task Id : attempt_1409339839617_0107_m_000001_2, Status : FAILED
Error: com.cloudera.sqoop.lib.LargeObjectLoader.<init>(Lorg/apache/hadoop/conf/Configuration;Lorg/apache/hadoop/fs/Path;)V
14/11/03 02:57:52 INFO mapreduce.Job:  map 100% reduce 0%
14/11/03 02:57:52 INFO mapreduce.Job: Job job_1409339839617_0107 failed with state FAILED due to: Task failed task_1409339839617_0107_m_000000
Job failed as tasks failed. failedMaps:1 failedReduces:0

还没有运气。

1 个答案:

答案 0 :(得分:2)

您缺少-D propertyname = property Value和第二个属性中的空格,您完全缺少-D部分。另请注意,这与Java中的系统属性不同,因此需要空间。

所以你的定义如下:

-Ddfs.mapred.max.split.size=1048576 mapreduce.job.max.split.locations=100

你应该这样做

-D dfs.mapred.max.split.size=1048576 -D mapreduce.job.max.split.locations=100