You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Hussein Baghdadi (JIRA)" <ji...@apache.org> on 2014/03/16 11:28:42 UTC
[jira] [Commented] (MAPREDUCE-5748) Potential null pointer
deference in ShuffleHandler#Shuffle#messageReceived()
[ https://issues.apache.org/jira/browse/MAPREDUCE-5748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937070#comment-13937070 ]
Hussein Baghdadi commented on MAPREDUCE-5748:
---------------------------------------------
mapIds is already checked for null values:
// line 472
[code]
if (mapIds == null || reduceQ == null || jobQ == null) {
sendError(ctx, "Required param job, map and reduce", BAD_REQUEST);
return;
}
[/code]
> Potential null pointer deference in ShuffleHandler#Shuffle#messageReceived()
> ----------------------------------------------------------------------------
>
> Key: MAPREDUCE-5748
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-5748
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Ted Yu
> Priority: Minor
>
> Starting around line 510:
> {code}
> ChannelFuture lastMap = null;
> for (String mapId : mapIds) {
> ...
> }
> lastMap.addListener(metrics);
> lastMap.addListener(ChannelFutureListener.CLOSE);
> {code}
> If mapIds is empty, lastMap would remain null, leading to NPE in addListener() call.
--
This message was sent by Atlassian JIRA
(v6.2#6252)