flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [2/2] flink git commit: [FLINK-4668] [clients] Fix positive random int generation
Date Fri, 23 Sep 2016 18:48:17 GMT
[FLINK-4668] [clients] Fix positive random int generation

This closes #2539


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

Branch: refs/heads/master
Commit: 40c978b0443d9cb3ee66b6e0e63ab61416deac25
Parents: dd90abe
Author: Alexander Pivovarov <apivovarov@gmail.com>
Authored: Thu Sep 22 23:26:27 2016 -0700
Committer: Greg Hogan <code@greghogan.com>
Committed: Fri Sep 23 13:48:15 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/flink/client/program/PackagedProgram.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/40c978b0/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
----------------------------------------------------------------------
diff --git a/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
b/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
index bff8e3e..2a88043 100644
--- a/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
+++ b/flink-clients/src/main/java/org/apache/flink/client/program/PackagedProgram.java
@@ -679,7 +679,7 @@ public class PackagedProgram {
 					
 						File tempFile;
 						try {
-							tempFile = File.createTempFile(String.valueOf(Math.abs(rnd.nextInt()) + "_"), name);
+							tempFile = File.createTempFile(rnd.nextInt(Integer.MAX_VALUE) + "_", name);
 							tempFile.deleteOnExit();
 						}
 						catch (IOException e) {


Mime
View raw message