public MasterCoprocessorHost getMasterCoprocessorHost() { return master.getMasterCoprocessorHost(); }
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetUserQuota(userName, table, quotaPojo); } });
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetNamespaceQuota(namespace, quotaPojo); } @Override
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetNamespaceQuota(namespace, quotaPojo); } });
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetUserQuota(userName, quotaPojo); } @Override
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetUserQuota(userName, table, quotaPojo); } @Override
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetTableQuota(table, quotaPojo); } });
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetRegionServerQuota(regionServer, quotaPojo); } });
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetUserQuota(userName, quotaPojo); } });
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetUserQuota( userName, namespace, quotaPojo); } @Override
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetUserQuota( userName, namespace, quotaPojo); } });
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetTableQuota(table, quotaPojo); } @Override
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetRegionServerQuota(regionServer, quotaPojo); }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preMergeRegions(regionsToMerge); LOG.info(getClientIdAuditPrefix() + " Merge regions " + regionsToMerge[0].getEncodedName() + " and " + regionsToMerge[1].getEncodedName()); submitProcedure(new MergeTableRegionsProcedure(procedureExecutor.getEnvironment(), regionsToMerge, forcible)); getMaster().getMasterCoprocessorHost().postMergeRegions(regionsToMerge); }
public IsRpcThrottleEnabledResponse isRpcThrottleEnabled(IsRpcThrottleEnabledRequest request) throws IOException { if (initialized) { masterServices.getMasterCoprocessorHost().preIsRpcThrottleEnabled(); boolean enabled = rpcThrottleStorage.isRpcThrottleEnabled(); IsRpcThrottleEnabledResponse response = IsRpcThrottleEnabledResponse.newBuilder().setRpcThrottleEnabled(enabled).build(); masterServices.getMasterCoprocessorHost().postIsRpcThrottleEnabled(enabled); return response; } else { LOG.warn("Skip get rpc throttle because rpc quota is disabled"); return IsRpcThrottleEnabledResponse.newBuilder().setRpcThrottleEnabled(false).build(); } }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preTruncateTable(tableName); LOG.info(getClientIdAuditPrefix() + " truncate " + tableName); ProcedurePrepareLatch latch = ProcedurePrepareLatch.createLatch(2, 0); submitProcedure(new TruncateTableProcedure(procedureExecutor.getEnvironment(), tableName, preserveSplits, latch)); latch.await(); getMaster().getMasterCoprocessorHost().postTruncateTable(tableName); }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preCreateTable(desc, newRegions); LOG.info(getClientIdAuditPrefix() + " create " + desc); // TODO: We can handle/merge duplicate requests, and differentiate the case of // TableExistsException by saying if the schema is the same or not. // // 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. ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch(); submitProcedure( new CreateTableProcedure(procedureExecutor.getEnvironment(), desc, newRegions, latch)); latch.await(); getMaster().getMasterCoprocessorHost().postCreateTable(desc, newRegions); }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preCreateNamespace(namespaceDescriptor); // 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. ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch(); LOG.info(getClientIdAuditPrefix() + " creating " + namespaceDescriptor); // Execute the operation synchronously - wait for the operation to complete before // continuing. setProcId(getClusterSchema().createNamespace(namespaceDescriptor, getNonceKey(), latch)); latch.await(); getMaster().getMasterCoprocessorHost().postCreateNamespace(namespaceDescriptor); }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preDeleteTable(tableName); LOG.info(getClientIdAuditPrefix() + " delete " + tableName); // TODO: We can handle/merge duplicate request // // 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. ProcedurePrepareLatch latch = ProcedurePrepareLatch.createBlockingLatch(); submitProcedure(new DeleteTableProcedure(procedureExecutor.getEnvironment(), tableName, latch)); latch.await(); getMaster().getMasterCoprocessorHost().postDeleteTable(tableName); }
@Override protected void run() throws IOException { getMaster().getMasterCoprocessorHost().preSplitRegion(regionInfo.getTable(), splitRow); LOG.info(getClientIdAuditPrefix() + " split " + regionInfo.getRegionNameAsString()); // Execute the operation asynchronously submitProcedure(getAssignmentManager().createSplitProcedure(regionInfo, splitRow)); }