[
https://issues.apache.org/jira/browse/HBASE-18600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16128194#comment-16128194
]
Guanghao Zhang commented on HBASE-18600:
----------------------------------------
Copy the comment.
bq. When doing a runAsUser, how/whether we should reset the Rpc context to have
the new user.
Do we have other scenario which need reset the Rpc context? If not, I thought
we can only fixed this for this problem. We can introduce a new config or
method to disable the "Short-Circuit Coprocessor HTable access" feature. The
code may be:
{code}
User.runAsLoginUser(new PrivilegedExceptionAction<Void>() {
@Override
public Void run() throws Exception {
// disable the "Short-Circuit Coprocessor HTable access" feature
first
// Then start a new rpc call
AccessControlLists.addUserPermission(regionEnv.getConfiguration(),
perm,
regionEnv.getTable(AccessControlLists.ACL_TABLE_NAME),
request.getMergeExistingPermissions());
return null;
}
});
{code}
> Provide a method to disable the Short-Circuit HTable in coprocessor
> -------------------------------------------------------------------
>
> Key: HBASE-18600
> URL: https://issues.apache.org/jira/browse/HBASE-18600
> Project: HBase
> Issue Type: Improvement
> Reporter: Guanghao Zhang
> Assignee: Guanghao Zhang
> Attachments: HBASE-18600.master.001.patch
>
>
> HBASE-9534: Allow coprocessors accessing an HTable to short-circuit access to
> the local HRegionServer, rather than requiring the usual RPC path. And it
> only worked for RegionCoprocessorEnvironment. This issue add a new method for
> RegionCoprocessorEnvironment. getShortCircuitTable method is used to get a
> short-circuit access HTable. And getTable method is used to get a normal
> table.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)