forked from OpenTSDB/asynchbase
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support code for different HBase server versions and 0.90.
The goal is to transparently support different HBase versions with the same client. Originally, this client didn't care what version the server was, because for what it uses of the protocol, nothing had changed since it was originally written, despite the RPC protocol version being bumped up a few times. Unfortunately, HBase isn't very good at maintaining backwards compatibility, and sadly 0.90 has a minor change that breaks it. Change all HBaseRPC implementations to declare whether or not they're sensitive to the version of the remote server. When HBase folks break backwards compatibility by changing the on-wire format of an RPC, then this RPC becomes sensitive to protocol version. This unfortunately happened in HBase 0.90 for the Get RPC (for no good reason IMO). HBaseRPC implementations are given the server's version when they're asked to serialize themselves, so they can adjust their behavior based on the version of the server they're talking to. Add a mechanism to automatically request the RegionServer's RPC protocol version with no extra overhead most of the time. We used to piggyback the magic "hello" header in the first packet sent to the RegionServer, along with the first RPC. We now additionally piggyback a version request too, so that both the "hello" + 1st RPC + version request go out in the same TCP packet (most of the time the 1st RPC is small). If a version-sensitive RPC attempts to go out before we know the version of the server, we delay it until the version is received. Change-Id: I130afd4305dfbe8bac4cfe4a50a06c6e239e266e
- Loading branch information
Showing
9 changed files
with
179 additions
and
34 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
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
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