Gilad Wolff created HBASE-7393:
----------------------------------
Summary: No way to change ProtocolEngine after initial rpc
connection is setup
Key: HBASE-7393
URL: https://issues.apache.org/jira/browse/HBASE-7393
Project: HBase
Issue Type: Bug
Components: IPC/RPC
Affects Versions: 0.92.1
Reporter: Gilad Wolff
After a master connection is established, if hbase configuration changes to use
a different rpc engine than the one originally used by the client there is no
way for client to start a new connection using a different rpc engine even if
the right configuration (i.e., hbase.rpc.engine is set to the new rpc engine).
I think the problem is in HBaseRPC.getProtocolEngine:
{code}
RpcEngine engine = PROTOCOL_ENGINES.get(protocol);
if (engine == null) {
// check for a configured default engine
Class<?> defaultEngine =
conf.getClass(RPC_ENGINE_PROP, WritableRpcEngine.class);
// check for a per interface override
Class<?> impl = conf.getClass(RPC_ENGINE_PROP+"."+protocol.getName(),
defaultEngine);
LOG.debug("Using "+impl.getName()+" for "+protocol.getName());
engine = (RpcEngine) ReflectionUtils.newInstance(impl, conf);
if (protocol.isInterface())
PROXY_ENGINES.put(Proxy.getProxyClass(protocol.getClassLoader(),
protocol),
engine);
PROTOCOL_ENGINES.put(protocol, engine);
}
return engine;
{code}
It seems that if a certain rpc engine was using to access the HMasterInterface
before, the same rpc engine will be used regardless of the configuration passed.
It will be better if the client jvm won't have to restart in order to replace
the rpc engine used.
--
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