Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/4757
to look at the new patch set (#2).
Change subject: [java client] Decouple TabletClient from RemoteTablet
......................................................................
[java client] Decouple TabletClient from RemoteTablet
RemoteTablet was caching TabletClients which was making it hard to test it
in isolation, since it required having real connections to servers.
This patch makes it so that only UUIDs are passed around, the client now
queries a RemoteTablet to know which UUID to get from ConnectionCache. A
lot of new unit tests were written that weren't possible before without
a lot of mocking.
Doing this brings subtle behavior changes. ConnectionCache is now the only
component responsible for handling TabletClients. The whole concept of
"reconnection"
could be brought into ConnectionCache, simplifying sendRpcToTablet. It also
means that using an object monitor likely creates a bottleneck in
ConnectionCache,
so a RWL was deployed instead.
Since I was in that code, I also changed the tablet ID from Slice to String in
RemoteTablet. It was an old mistake I made years ago, we didn't need the Slice.
This still needs to be benchmarked against the 1.0.x client jar.
Change-Id: If3ad2190c7e2c7f51cb9ffe6ed3348b62488e675
---
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
M java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduScanner.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Batch.java
M java/kudu-client/src/main/java/org/apache/kudu/client/ConnectionCache.java
M java/kudu-client/src/main/java/org/apache/kudu/client/KuduRpc.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java
A java/kudu-client/src/main/java/org/apache/kudu/client/PingRequest.java
A java/kudu-client/src/main/java/org/apache/kudu/client/PingResponse.java
M java/kudu-client/src/main/java/org/apache/kudu/client/RemoteTablet.java
M java/kudu-client/src/main/java/org/apache/kudu/client/Statistics.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TableLocationsCache.java
M java/kudu-client/src/main/java/org/apache/kudu/client/TabletClient.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduClient.java
M
java/kudu-client/src/test/java/org/apache/kudu/client/TestAsyncKuduSession.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestConnectionCache.java
A java/kudu-client/src/test/java/org/apache/kudu/client/TestRemoteTablet.java
M java/kudu-client/src/test/java/org/apache/kudu/client/TestUtils.java
17 files changed, 628 insertions(+), 525 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/57/4757/2
--
To view, visit http://gerrit.cloudera.org:8080/4757
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If3ad2190c7e2c7f51cb9ffe6ed3348b62488e675
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]>
Gerrit-Reviewer: Kudu Jenkins