當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。