forked from apache/kudu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 Reviewed-on: http://gerrit.cloudera.org:8080/4757 Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <[email protected]> Reviewed-by: Adar Dembo <[email protected]>
- Loading branch information
Showing
17 changed files
with
623 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.