You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by se...@apache.org on 2018/01/24 22:44:03 UTC
hive git commit: HIVE-18506 : LlapBaseInputFormat - negative array
index (Oleg Danilov, reviewed by Sergey Shelukhin)
Repository: hive
Updated Branches:
refs/heads/master ee802dba3 -> 4183ea900
HIVE-18506 : LlapBaseInputFormat - negative array index (Oleg Danilov, reviewed by Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/4183ea90
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/4183ea90
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/4183ea90
Branch: refs/heads/master
Commit: 4183ea900e5dc2f862cdc330338add6935e1f518
Parents: ee802db
Author: sergey <se...@apache.org>
Authored: Wed Jan 24 14:43:52 2018 -0800
Committer: sergey <se...@apache.org>
Committed: Wed Jan 24 14:43:52 2018 -0800
----------------------------------------------------------------------
.../src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/4183ea90/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java
----------------------------------------------------------------------
diff --git a/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java b/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java
index fc360d4..0120639 100644
--- a/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java
+++ b/llap-ext-client/src/java/org/apache/hadoop/hive/llap/LlapBaseInputFormat.java
@@ -381,7 +381,7 @@ public class LlapBaseInputFormat<V extends WritableComparable<?>>
LOG.info("Finding random live service instance");
Collection<LlapServiceInstance> allInstances = instanceSet.getAll();
if (allInstances.size() > 0) {
- int randIdx = rand.nextInt() % allInstances.size();
+ int randIdx = rand.nextInt(allInstances.size());;
serviceInstance = allInstances.toArray(serviceInstanceArray)[randIdx];
}
return serviceInstance;