[ 
https://issues.apache.org/jira/browse/MAPREDUCE-6055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14113304#comment-14113304
 ] 

Manu Zhang commented on MAPREDUCE-6055:
---------------------------------------

And another issue reported by findbugs below

{code}
  public static NativeTaskOutput createNativeTaskOutput(Configuration conf, 
String id) {
    Class<?> clazz = conf.getClass(OutputUtil.NATIVE_TASK_OUTPUT_MANAGER,
        NativeTaskOutputFiles.class);
    LOG.info(OutputUtil.NATIVE_TASK_OUTPUT_MANAGER + " = " + clazz.getName());
    try {
      Constructor<?> ctor = clazz.getConstructor(Configuration.class, 
String.class);
      ctor.setAccessible(true);
      NativeTaskOutput instance = (NativeTaskOutput) ctor.newInstance(conf, id);
      return instance;
    } catch (Exception e) {
      return null;
    }
  }
{code}

better to throw RuntimeException than "return null" here ?

> native-task: findbugs, interface annotations, and other misc cleanup
> --------------------------------------------------------------------
>
>                 Key: MAPREDUCE-6055
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6055
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: task
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>         Attachments: mapreduce-6055.txt
>
>
> A few items which we need to address before merge:
> - fix findbugs errors
> - add interface and stability annotations to all public classes
> - fix eclipse warnings where possible



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to