/** * Get a Namespace * @param name Name of the Namespace * @return Namespace descriptor for <code>name</code> */ NamespaceDescriptor getNamespace(String name) throws IOException { checkInitialized(); if (this.cpHost != null) this.cpHost.preGetNamespaceDescriptor(name); NamespaceDescriptor nsd = this.clusterSchemaService.getNamespace(name); if (this.cpHost != null) this.cpHost.postGetNamespaceDescriptor(nsd); return nsd; }
@Override public int getNumDeadRegionServers() { ServerManager serverManager = this.master.getServerManager(); if (serverManager == null) { return 0; } return serverManager.getDeadServers().size(); }
@Override public void preApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().preSetUserQuota(userName, quotaPojo); } @Override
public void start() throws IOException { TableDescriptors tableDescriptors = master.getTableDescriptors(); migrateZooKeeper(); Connection connection = master.getConnection(); fixTableStates(tableDescriptors, connection); }
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetUserQuota(userName, table, quotaPojo); } });
public MetricsMaster(MetricsMasterWrapper masterWrapper) { masterSource = CompatibilitySingletonFactory.getInstance(MetricsMasterSourceFactory.class).create(masterWrapper); masterProcSource = CompatibilitySingletonFactory.getInstance(MetricsMasterProcSourceFactory.class).create(masterWrapper); masterQuotaSource = CompatibilitySingletonFactory.getInstance(MetricsMasterQuotaSourceFactory.class).create(masterWrapper); serverCrashProcMetrics = convertToProcedureMetrics(masterSource.getServerCrashMetrics()); }
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetTableQuota(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().preSetTableQuota(table, quotaPojo); } @Override
/** * Determines if there is a MasterCoprocessor deployed which implements * {@link org.apache.hadoop.hbase.protobuf.generated.VisibilityLabelsProtos.VisibilityLabelsService.Interface}. */ boolean hasVisibilityLabelsServiceCoprocessor(MasterCoprocessorHost cpHost) { return checkCoprocessorWithService( cpHost.findCoprocessors(MasterCoprocessor.class), VisibilityLabelsService.Interface.class); }
@Override public void postApply(GlobalQuotaSettingsImpl quotaPojo) throws IOException { masterServices.getMasterCoprocessorHost().postSetRegionServerQuota(regionServer, quotaPojo); } });
@Override public synchronized void doStart() { try { notifyStarted(); this.tableNamespaceManager.start(); } catch (IOException ioe) { notifyFailed(ioe); } }
public ClusterMetrics getClusterMetrics(EnumSet<Option> options) throws IOException { if (cpHost != null) { cpHost.preGetClusterMetrics(); } ClusterMetrics status = getClusterMetricsWithoutCoprocessor(options); if (cpHost != null) { cpHost.postGetClusterMetrics(status); } return status; }
@Override public void postEnvCall() { // invoke coprocessor stop method shutdown(this.getEnvironment()); } });
@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().postSetUserQuota(userName, quotaPojo); } });
/** * Determines if there is a MasterCoprocessor deployed which implements * {@link org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos.AccessControlService.Interface}. */ boolean hasAccessControlServiceCoprocessor(MasterCoprocessorHost cpHost) { return checkCoprocessorWithService( cpHost.findCoprocessors(MasterCoprocessor.class), AccessControlService.Interface.class); }
@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); } });