本文整理汇总了Java中org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv.getMasterCoprocessorHost方法的典型用法代码示例。如果您正苦于以下问题:Java MasterProcedureEnv.getMasterCoprocessorHost方法的具体用法?Java MasterProcedureEnv.getMasterCoprocessorHost怎么用?Java MasterProcedureEnv.getMasterCoprocessorHost使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv
的用法示例。
在下文中一共展示了MasterProcedureEnv.getMasterCoprocessorHost方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: preMergeRegionsCommit
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
/**
* Post merge region action
* @param env MasterProcedureEnv
**/
private void preMergeRegionsCommit(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
@MetaMutationAnnotation
final List<Mutation> metaEntries = new ArrayList<Mutation>();
cpHost.preMergeRegionsCommit(regionsToMerge, metaEntries, getUser());
try {
for (Mutation p : metaEntries) {
RegionInfo.parseRegionName(p.getRow());
}
} catch (IOException e) {
LOG.error("Row key of mutation from coprocessor is not parsable as region name."
+ "Mutations from coprocessor should only be for hbase:meta table.", e);
throw e;
}
}
}
示例2: preSplitRegion
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
/**
* Action before splitting region in a table.
* @param env MasterProcedureEnv
* @throws IOException
* @throws InterruptedException
*/
private void preSplitRegion(final MasterProcedureEnv env)
throws IOException, InterruptedException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preSplitRegionAction(getTableName(), getSplitRow(), getUser());
}
// TODO: Clean up split and merge. Currently all over the place.
// Notify QuotaManager and RegionNormalizer
try {
env.getMasterServices().getMasterQuotaManager().onRegionSplit(this.getParentRegion());
} catch (QuotaExceededException e) {
env.getAssignmentManager().getRegionNormalizer().planSkipped(this.getParentRegion(),
NormalizationPlan.PlanType.SPLIT);
throw e;
}
}
示例3: preSplitRegionBeforeMETA
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
/**
* Post split region actions before the Point-of-No-Return step
* @param env MasterProcedureEnv
**/
private void preSplitRegionBeforeMETA(final MasterProcedureEnv env)
throws IOException, InterruptedException {
final List<Mutation> metaEntries = new ArrayList<Mutation>();
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preSplitBeforeMETAAction(getSplitRow(), metaEntries, getUser());
try {
for (Mutation p : metaEntries) {
RegionInfo.parseRegionName(p.getRow());
}
} catch (IOException e) {
LOG.error("pid=" + getProcId() + " row key of mutation from coprocessor not parsable as "
+ "region name."
+ "Mutations from coprocessor should only for hbase:meta table.");
throw e;
}
}
}
示例4: prePeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void prePeerModification(MasterProcedureEnv env) throws IOException {
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preEnableReplicationPeer(peerId);
}
env.getReplicationPeerManager().preEnablePeer(peerId);
}
示例5: postPeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void postPeerModification(MasterProcedureEnv env) throws IOException {
LOG.info("Successfully enabled peer {}", peerId);
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postEnableReplicationPeer(peerId);
}
}
示例6: prePeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void prePeerModification(MasterProcedureEnv env) throws IOException {
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preRemoveReplicationPeer(peerId);
}
env.getReplicationPeerManager().preRemovePeer(peerId);
}
示例7: postPeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void postPeerModification(MasterProcedureEnv env)
throws IOException, ReplicationException {
env.getReplicationPeerManager().removeAllQueuesAndHFileRefs(peerId);
LOG.info("Successfully removed peer {}", peerId);
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postRemoveReplicationPeer(peerId);
}
}
示例8: prePeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void prePeerModification(MasterProcedureEnv env)
throws IOException, ReplicationException {
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preAddReplicationPeer(peerId, peerConfig);
}
env.getReplicationPeerManager().preAddPeer(peerId, peerConfig);
}
示例9: postPeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void postPeerModification(MasterProcedureEnv env) throws IOException {
LOG.info("Successfully added {} peer {}, config {}", enabled ? "ENABLED" : "DISABLED", peerId,
peerConfig);
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
env.getMasterCoprocessorHost().postAddReplicationPeer(peerId, peerConfig);
}
}
示例10: prePeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void prePeerModification(MasterProcedureEnv env) throws IOException {
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preDisableReplicationPeer(peerId);
}
env.getReplicationPeerManager().preDisablePeer(peerId);
}
示例11: postPeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void postPeerModification(MasterProcedureEnv env) throws IOException {
LOG.info("Successfully disabled peer {}", peerId);
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postDisableReplicationPeer(peerId);
}
}
示例12: prePeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void prePeerModification(MasterProcedureEnv env) throws IOException {
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preUpdateReplicationPeerConfig(peerId, peerConfig);
}
env.getReplicationPeerManager().preUpdatePeerConfig(peerId, peerConfig);
}
示例13: postPeerModification
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
@Override
protected void postPeerModification(MasterProcedureEnv env) throws IOException {
LOG.info("Successfully updated peer config of {} to {}", peerId, peerConfig);
MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postUpdateReplicationPeerConfig(peerId, peerConfig);
}
}
示例14: preMergeRegions
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
/**
* Pre merge region action
* @param env MasterProcedureEnv
**/
private void preMergeRegions(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.preMergeRegionsAction(regionsToMerge, getUser());
}
// TODO: Clean up split and merge. Currently all over the place.
try {
env.getMasterServices().getMasterQuotaManager().onRegionMerged(this.mergedRegion);
} catch (QuotaExceededException e) {
env.getAssignmentManager().getRegionNormalizer().planSkipped(this.mergedRegion,
NormalizationPlan.PlanType.MERGE);
throw e;
}
}
示例15: postRollBackMergeRegions
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv; //导入方法依赖的package包/类
/**
* Action after rollback a merge table regions action.
* @param env MasterProcedureEnv
* @throws IOException
*/
private void postRollBackMergeRegions(final MasterProcedureEnv env) throws IOException {
final MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
if (cpHost != null) {
cpHost.postRollBackMergeRegionsAction(regionsToMerge, getUser());
}
}