当前位置: 动力学知识库 > 问答 > 编程问答 >

java - Exception using cloudera hadoop maven dependency

问题描述:

I am trying to run a mapreduce program in eclipse using cloudera hadoop maven dependencies in the pom.xml in Windows 7. While using 2.0.0-cdh4.0.0 dependency version in pom.xml, program is working smoothly but when I change the version to 2.0.0-cdh4.6.0, it is throwing following warning message.

WARN fs.LocalDirAllocator$AllocatorPerContext: Failed to create

/tmp/hadoop-Abhijeet/mapred/local/file:/tmp/hadoop-Abhijeet/mapred/local/localRunner/Abhijeet/job_local83327001_0001/attempt_local83327001_0001_m_000001_0

(Please note that the pattern of file path is unusual(file:/ in between the path))

and eventually it is throwing an exception which is following,

 java.lang.Exception: java.lang.IllegalArgumentException: n must be positive

at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:401)

Caused by: java.lang.IllegalArgumentException: n must be positive

at java.util.Random.nextInt(Random.java:250)

at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.confChanged(LocalDirAllocator.java:305)

at org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:344)

at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:150)

at org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:131)

at org.apache.hadoop.mapred.MROutputFiles.getSpillFileForWrite(MROutputFiles.java:146)

at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.sortAndSpill(MapTask.java:1558)

at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1452)

at org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:693)

at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:761)

at org.apache.hadoop.mapred.MapTask.run(MapTask.java:338)

at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:233)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

The program also works for 2.2.0 version. I have to use the 2.0.0-cdh4.6.0 version. What can be the possible fix for my situation ?

分享给朋友:
您可能感兴趣的文章:
随机阅读: