[
https://issues.apache.org/jira/browse/FLINK-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16065741#comment-16065741
]
ASF GitHub Bot commented on FLINK-6422:
---------------------------------------
GitHub user zhangminglei opened a pull request:
https://github.com/apache/flink/pull/4202
[FLINK-6422] [core] Unreachable code in FileInputFormat#createInputSp…
Fix Unreachable code in FileInputFormat#createInputSplits.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zhangminglei/flink flink-6422
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4202.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4202
----
commit 4cc3e55621372eaf4a9661939f52656aeef4eeef
Author: zhangminglei <[email protected]>
Date: 2017-06-28T00:45:12Z
[FLINK-6422] [core] Unreachable code in FileInputFormat#createInputSplits
----
> Unreachable code in FileInputFormat#createInputSplits
> -----------------------------------------------------
>
> Key: FLINK-6422
> URL: https://issues.apache.org/jira/browse/FLINK-6422
> Project: Flink
> Issue Type: Bug
> Components: Batch Connectors and Input/Output Formats
> Reporter: Ted Yu
> Assignee: mingleizhang
> Priority: Minor
>
> Here is related code:
> {code}
> if (minNumSplits < 1) {
> throw new IllegalArgumentException("Number of input splits has to be at
> least 1.");
> }
> ...
> final long maxSplitSize = (minNumSplits < 1) ? Long.MAX_VALUE :
> (totalLength / minNumSplits +
> (totalLength % minNumSplits == 0 ? 0 : 1));
> {code}
> minNumSplits wouldn't be less than 1 getting to the assignment of
> maxSplitSize.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)