Hello Will Berkeley, Kudu Jenkins, Todd Lipcon,

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/12158

to look at the new patch set (#10).

Change subject: KUDU-2348: Pick a random replica in RemoteTablet.java
......................................................................

KUDU-2348: Pick a random replica in RemoteTablet.java

In RemoteTablet.java, 'getClosestServerInfo' always returns
whichever server ends up last in the map iteration order, if
all servers in the cluster is fully remote. This behavior
would cause heavy load on a particular server if there are
few servers in the cluster.

This patch fix the issue by generating a random non-negative
integer(randomInt) in RemoteTablet intializer and choose server
based on randomInt. The randomInt variable is static so the
choice is same across multiple RemoteTablet instances.

Change-Id: I3d70e45d4c9532bb32223c1dddd0936b4ff8fd99
---
M java/kudu-client/src/main/java/org/apache/kudu/client/RemoteTablet.java
1 file changed, 25 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/58/12158/10
--
To view, visit http://gerrit.cloudera.org:8080/12158
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3d70e45d4c9532bb32223c1dddd0936b4ff8fd99
Gerrit-Change-Number: 12158
Gerrit-PatchSet: 10
Gerrit-Owner: Yifan Zhang <chinazhangyi...@163.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com>
Gerrit-Reviewer: Yifan Zhang <chinazhangyi...@163.com>

Reply via email to