You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2020/09/05 10:30:00 UTC
[jira] [Resolved] (HBASE-7393) No way to change ProtocolEngine
after initial rpc connection is setup
[ https://issues.apache.org/jira/browse/HBASE-7393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duo Zhang resolved HBASE-7393.
------------------------------
Resolution: Not A Problem
We have changed the rpc implementation now.
> 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
> Priority: Major
>
> 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 was sent by Atlassian Jira
(v8.3.4#803005)