当前位置: 首页>>代码示例>>Java>>正文


Java MasterProcedureEnv.getMasterCoprocessorHost方法代码示例

本文整理汇总了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;
    }
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:22,代码来源:MergeTableRegionsProcedure.java

示例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;
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:24,代码来源:SplitTableRegionProcedure.java

示例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;
    }
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:23,代码来源:SplitTableRegionProcedure.java

示例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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:EnablePeerProcedure.java

示例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);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:EnablePeerProcedure.java

示例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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:RemovePeerProcedure.java

示例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);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:11,代码来源:RemovePeerProcedure.java

示例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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:10,代码来源:AddPeerProcedure.java

示例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);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:10,代码来源:AddPeerProcedure.java

示例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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:DisablePeerProcedure.java

示例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);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:DisablePeerProcedure.java

示例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);
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:UpdatePeerConfigProcedure.java

示例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);
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:UpdatePeerConfigProcedure.java

示例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;
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:19,代码来源:MergeTableRegionsProcedure.java

示例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());
  }
}
 
开发者ID:apache,项目名称:hbase,代码行数:12,代码来源:MergeTableRegionsProcedure.java


注:本文中的org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv.getMasterCoprocessorHost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。