[
https://issues.apache.org/jira/browse/HBASE-7188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13539866#comment-13539866
]
stack commented on HBASE-7188:
------------------------------
Elliott, now client-side, when Invoker does getProtocolVersion, it is reading
the local version of the protocol (HBaseClientRPC.getProtocolVersion). Is that
right? When does client ever learn the server version? When I set up the
protocol, should I not be going to the server to ask its version of the
protocol? At least for the server version of this protocol? Or how do you see
this versioning and proxying working on protocol Interfaces now? Previous,
after getting proxy, we used to do a getProtocolVersion and throw exception if
the client and server versions didn't match. We don't do that anymore it
seems. Here is old code from 0.94:
{code}
17 /** Construct a client-side proxy object that implements the named
protocol,
16 * talking to a server at the named address. */
15 public VersionedProtocol getProxy(
14 Class<? extends VersionedProtocol> protocol, long clientVersion,
13 InetSocketAddress addr, User ticket,
12 Configuration conf, SocketFactory factory, int rpcTimeout)
11 throws IOException {
10
9 VersionedProtocol proxy =
8 (VersionedProtocol) Proxy.newProxyInstance(
7 protocol.getClassLoader(), new Class[] { protocol },
6 new Invoker(protocol, addr, ticket, conf, factory,
rpcTimeout));
5 if (proxy instanceof VersionedProtocol) {
4 long serverVersion = ((VersionedProtocol)proxy)
3 .getProtocolVersion(protocol.getName(), clientVersion);
2 if (serverVersion != clientVersion) {
1 throw new HBaseRPC.VersionMismatch(protocol.getName(),
clientVersion,
0 serverVersion);
1 }
2 }
3 return proxy;
4 }
{code}
> Move classes into hbase-client
> ------------------------------
>
> Key: HBASE-7188
> URL: https://issues.apache.org/jira/browse/HBASE-7188
> Project: HBase
> Issue Type: Sub-task
> Components: Client, IPC/RPC
> Affects Versions: 0.96.0
> Reporter: Elliott Clark
> Assignee: Elliott Clark
> Fix For: 0.96.0
>
> Attachments: HBASE-7188-0.patch, HBASE-7188-1.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira