flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLINK-3668) Potential null deference in HadoopInputFormatBase#createInputSplits()
Date Fri, 25 Mar 2016 17:28:25 GMT

     [ https://issues.apache.org/jira/browse/FLINK-3668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu resolved FLINK-3668.
---------------------------
    Resolution: Not A Problem

InterruptedIOException should be thrown - that's minor

I looked at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/InputFormat.java
where there is no mentioning whether the getSplits() can return null.

I also looked at several stock hadoop InputFormat's - none of them returns null.

> Potential null deference in HadoopInputFormatBase#createInputSplits()
> ---------------------------------------------------------------------
>
>                 Key: FLINK-3668
>                 URL: https://issues.apache.org/jira/browse/FLINK-3668
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Minor
>
> Here is the code:
> {code}
>     List<org.apache.hadoop.mapreduce.InputSplit> splits;
>     try {
>       splits = this.mapreduceInputFormat.getSplits(jobContext);
>     } catch (InterruptedException e) {
>       throw new IOException("Could not get Splits.", e);
>     }
>     HadoopInputSplit[] hadoopInputSplits = new HadoopInputSplit[splits.size()];
> {code}
> If InterruptedException is caught, splits would be null.
> Yet, the next line accesses splits.size() without null check.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message