[
https://issues.apache.org/jira/browse/MAPREDUCE-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14112604#comment-14112604
]
Jason Lowe commented on MAPREDUCE-5931:
---------------------------------------
Thanks for updating the patch, Gera! Apologies for the delay in re-reviewing.
Patch looks good overall, just some minor nits.
Most programs use a predefined exit code (often 2) for all usage errors, so
it's interesting to see different ones being used. Also it's a bit odd to see
a function like printUsage requiring an argument whose only purpose is to be
the value the function will return. I'm guessing this is for brevity on the
caller side, but the appearance is a bit odd. We could solve both of these by
simply having printUsage() always return 2 and drop the exitCode arg. Is it
important to return different exit codes for these usage errors?
One very minor nit is that the usage error message for recordSleepTime uses a
comma while all the others use a colon.
> Validate SleepJob command line parameters
> -----------------------------------------
>
> Key: MAPREDUCE-5931
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5931
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: test
> Affects Versions: 1.2.1, 2.4.0
> Reporter: Gera Shegalov
> Assignee: Gera Shegalov
> Priority: Minor
> Attachments: MAPREDUCE-5931.v01.patch, MAPREDUCE-5931.v02.patch,
> MAPREDUCE-5931.v03.patch
>
>
> This is a minor issue per se. I had a typo in my script specifying a negative
> number of reducers for the SleepJob. It results in the exception that is far
> from the root cause, and appeared as a serious issue with the map-side sort.
> {noformat}
> 2014-06-17 21:42:48,072 INFO [main] org.apache.hadoop.mapred.MapTask:
> Ignoring exception during close for
> org.apache.hadoop.mapred.MapTask$NewOutputCollector@972141f
> java.lang.NullPointerException
> at
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1447)
> at
> org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:700)
> at org.apache.hadoop.mapred.MapTask.closeQuietly(MapTask.java:1990)
> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:774)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
> at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:173)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1626)
> at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168)
> 2014-06-17 21:42:48,075 WARN [main] org.apache.hadoop.mapred.YarnChild:
> Exception running child : java.lang.IllegalArgumentException
> at java.nio.ByteBuffer.allocate(ByteBuffer.java:330)
> at org.apache.hadoop.mapred.SpillRecord.<init>(SpillRecord.java:51)
> at
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.mergeParts(MapTask.java:1824)
> at
> org.apache.hadoop.mapred.MapTask$MapOutputBuffer.flush(MapTask.java:1484)
> at
> org.apache.hadoop.mapred.MapTask$NewOutputCollector.close(MapTask.java:700)
> at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:770)
> at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
> at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:173)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:415)
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1626)
> at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)