[
https://issues.apache.org/jira/browse/MAPREDUCE-4940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Joseph Evans resolved MAPREDUCE-4940.
--------------------------------------------
Resolution: Duplicate
> division by zero in getLocalPathForWrite()
> ------------------------------------------
>
> Key: MAPREDUCE-4940
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4940
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Ted Yu
>
> see
> https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/345/testReport/org.apache.hadoop.hbase.mapreduce/TestImportExport/testSimpleCase/
> {code}
> 2013-01-12 11:53:52,809 WARN [AsyncDispatcher event handler]
> resourcemanager.RMAuditLogger(255): USER=jenkins OPERATION=Application
> Finished - Failed TARGET=RMAppManager RESULT=FAILURE DESCRIPTION=App
> failed with state: FAILED PERMISSIONS=Application
> application_1357991604658_0002 failed 1 times due to AM Container for
> appattempt_1357991604658_0002_000001 exited with exitCode: -1000 due to:
> java.lang.ArithmeticException: / by zero
> at
> org.apache.hadoop.fs.LocalDirAllocator$AllocatorPerContext.getLocalPathForWrite(LocalDirAllocator.java:368)
> at
> org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:150)
> at
> org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:131)
> at
> org.apache.hadoop.fs.LocalDirAllocator.getLocalPathForWrite(LocalDirAllocator.java:115)
> at
> org.apache.hadoop.yarn.server.nodemanager.LocalDirsHandlerService.getLocalPathForWrite(LocalDirsHandlerService.java:279)
> at
> org.apache.hadoop.yarn.server.nodemanager.containermanager.localizer.ResourceLocalizationService$LocalizerRunner.run(ResourceLocalizationService.java:851)
> .Failing this attempt.. Failing the application.
> APPID=application_1357991604658_0002
> {code}
> Here is related code:
> {code}
> // Keep rolling the wheel till we get a valid path
> Random r = new java.util.Random();
> while (numDirsSearched < numDirs && returnPath == null) {
> long randomPosition = Math.abs(r.nextLong()) % totalAvailable;
> {code}
> My guess is that totalAvailable was 0, meaning dirDF was empty.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira