phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samarth Jain (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3994) Index RPC priority still depends on the controller factory property in hbase-site.xml
Date Wed, 12 Jul 2017 20:46:00 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-3994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084652#comment-16084652
] 

Samarth Jain commented on PHOENIX-3994:
---------------------------------------

OK, confirmed that adding RpcSchedulerFactory in the preOpen() coprocessor hook doesn't work.
This is what I did. 

I added the RpcSchedulerFactory in preOpen() of the Indexer co-processor and BaseScannerRegionObserver.

{code}
@Override
    public void preOpen(ObserverContext<RegionCoprocessorEnvironment> e) throws IOException
{
        final RegionCoprocessorEnvironment env = e.getEnvironment();
        env.getConfiguration().setClass(RSRpcServices.REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS,

            PhoenixRpcSchedulerFactory.class, RpcSchedulerFactory.class);
        super.preOpen(e);
    }
{code}

and saw that the PhoenixRpcSchedulerFactory wasn't instantiated at all. So it is too late.
Looked briefly at the HBase code and saw that we get hold of the RpcSchedulerFactory in the
constructor of RSRpcServices which I am guessing happens before preOpen() is called (kinda
makes sense too since preOpen() on a region is an RPC from HMaster which is handled/scheduled
by region server opening the region). 

{code}
try {
      Class<?> rpcSchedulerFactoryClass = rs.conf.getClass(
          REGION_SERVER_RPC_SCHEDULER_FACTORY_CLASS,
          SimpleRpcSchedulerFactory.class);
      rpcSchedulerFactory = ((RpcSchedulerFactory) rpcSchedulerFactoryClass.newInstance());
    } 
{code}


> Index RPC priority still depends on the controller factory property in hbase-site.xml
> -------------------------------------------------------------------------------------
>
>                 Key: PHOENIX-3994
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3994
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.11.0
>            Reporter: Sergey Soldatov
>            Assignee: Samarth Jain
>            Priority: Critical
>             Fix For: 4.12.0, 4.11.1
>
>         Attachments: PHOENIX-3994_addendum.patch, PHOENIX-3994.patch, PHOENIX-3994_v2.patch,
PHOENIX-3994_v3.patch
>
>
> During PHOENIX-3360 we tried to remove dependency on hbase.rpc.controllerfactory.class
property in hbase-site.xml since it cause problems on the client side (if client is using
server side configuration, all client request may go using index priority). Committed solution
is using setting the controller factory programmatically for coprocessor environment in Indexer
class, but it comes that this solution doesn't work because the environment configuration
is not used for the coprocessor connection creation. We need to provide a better solution
since this issue may cause accidental locks and failures that hard to identify and avoid.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message