virajjasani commented on pull request #2851:
URL: https://github.com/apache/hbase/pull/2851#issuecomment-756747176
Looks like Admin access is taken care of by
```
getMaster().getMasterCoprocessorHost().preDisableTable(tableName);
```
It is used by HMaster:
```
@Override
public long disableTable(final TableName tableName, final long nonceGroup,
final long nonce)
throws IOException {
checkInitialized();
return MasterProcedureUtil.submitProcedure(
new MasterProcedureUtil.NonceProcedureRunnable(this, nonceGroup,
nonce) {
@Override
protected void run() throws IOException {
getMaster().getMasterCoprocessorHost().preDisableTable(tableName);
LOG.info(getClientIdAuditPrefix() + " disable " + tableName);
// Execute the operation asynchronously - client will check the
progress of the operation
// In case the request is from a <1.1 client before returning,
// we want to make sure that the table is prepared to be
// enabled (the table is locked and the table state is set).
// Note: if the procedure throws exception, we will catch it and
rethrow.
//
// We need to wait for the procedure to potentially fail due to
"prepare" sanity
// checks. This will block only the beginning of the procedure. See
HBASE-19953.
final ProcedurePrepareLatch prepareLatch =
ProcedurePrepareLatch.createBlockingLatch();
submitProcedure(new
DisableTableProcedure(procedureExecutor.getEnvironment(),
tableName, false, prepareLatch));
prepareLatch.await();
getMaster().getMasterCoprocessorHost().postDisableTable(tableName);
}
@Override
protected String getDescription() {
return "DisableTableProcedure";
}
});
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]