flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzuli...@apache.org
Subject [1/7] flink git commit: [FLINK-6422] [core] Unreachable code in FileInputFormat#createInputSplits
Date Thu, 06 Jul 2017 04:23:47 GMT
Repository: flink
Updated Branches:
  refs/heads/master 546e9a77e -> 6eae45ea8


[FLINK-6422] [core] Unreachable code in FileInputFormat#createInputSplits

This closes #4202.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/6eae45ea
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/6eae45ea
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/6eae45ea

Branch: refs/heads/master
Commit: 6eae45ea88408d2496edbf54c75e0578eed72e8d
Parents: 21ec86f
Author: zhangminglei <zml13856086071@163.com>
Authored: Wed Jun 28 08:45:12 2017 +0800
Committer: Tzu-Li (Gordon) Tai <tzulitai@apache.org>
Committed: Thu Jul 6 12:11:57 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/flink/api/common/io/FileInputFormat.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/6eae45ea/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
b/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
index 4e81dab..1c8e7ff 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java
@@ -501,8 +501,7 @@ public abstract class FileInputFormat<OT> extends RichInputFormat<OT,
FileInputS
 		}
 		
 
-		final long maxSplitSize = (minNumSplits < 1) ? Long.MAX_VALUE : (totalLength / minNumSplits
+
-					(totalLength % minNumSplits == 0 ? 0 : 1));
+		final long maxSplitSize = totalLength / minNumSplits + (totalLength % minNumSplits == 0
? 0 : 1);
 
 		// now that we have the files, generate the splits
 		int splitNum = 0;


Mime
View raw message