tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-1901. Fix findbugs warnings in tez-examples. (hitesh)
Date Mon, 19 Jan 2015 22:41:49 GMT
Repository: tez
Updated Branches:
  refs/heads/master 743f77ff1 -> 4bc64b5c3


TEZ-1901. Fix findbugs warnings in tez-examples. (hitesh)


Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/4bc64b5c
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/4bc64b5c
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/4bc64b5c

Branch: refs/heads/master
Commit: 4bc64b5c32f39ffa04bb1e29879ea06c0a9e3327
Parents: 743f77f
Author: Hitesh Shah <hitesh@apache.org>
Authored: Mon Jan 19 14:41:34 2015 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Mon Jan 19 14:41:34 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                      | 1 +
 .../src/main/java/org/apache/tez/examples/JoinDataGen.java       | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/4bc64b5c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ad89b68..1b7b2b0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -7,6 +7,7 @@ Release 0.7.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1901. Fix findbugs warnings in tez-examples.
   TEZ-1941. Memory provided by *Context.getAvailableMemory needs to be setup explicitly.
   TEZ-1879. Create local UGI instances for each task and the AM, when running in LocalMode.
   TEZ-1661. LocalTaskScheduler hangs when shutdown.

http://git-wip-us.apache.org/repos/asf/tez/blob/4bc64b5c/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
----------------------------------------------------------------------
diff --git a/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java b/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
index 8df452f..684ea5b 100644
--- a/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
+++ b/tez-examples/src/main/java/org/apache/tez/examples/JoinDataGen.java
@@ -257,7 +257,7 @@ public class JoinDataGen extends TezExampleBase {
       StringBuilder sb = new StringBuilder();
       Random random = new Random();
       for (int i = 0; i < size; i++) {
-        int r = Math.abs(random.nextInt()) % 26;
+        int r = random.nextInt(Integer.MAX_VALUE) % 26;
         // Random a-z followed by the count
         sb.append((char) (97 + r));
       }
@@ -269,7 +269,7 @@ public class JoinDataGen extends TezExampleBase {
       StringBuilder sb = new StringBuilder();
       Random random = new Random();
       for (int i = 0; i < size; i++) {
-        int r = Math.abs(random.nextInt()) % 26;
+        int r = random.nextInt(Integer.MAX_VALUE) % 26;
         // Random A-Z followed by the count
         sb.append((char) (65 + r));
       }


Mime
View raw message