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


Java RegionServerSnapshotManager类代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager的典型用法代码示例。如果您正苦于以下问题:Java RegionServerSnapshotManager类的具体用法?Java RegionServerSnapshotManager怎么用?Java RegionServerSnapshotManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RegionServerSnapshotManager类属于org.apache.hadoop.hbase.regionserver.snapshot包,在下文中一共展示了RegionServerSnapshotManager类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setUpBeforeClass

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
  UTIL.getConfiguration().setBoolean("hbase.online.schema.update.enable", true);
  UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100);
  UTIL.getConfiguration().setInt("hbase.client.pause", 250);
  UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
  UTIL.getConfiguration().setBoolean(
      "hbase.master.enabletable.roundrobin", true);

  // Enable snapshot
  UTIL.getConfiguration().setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  UTIL.getConfiguration().setLong(RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT * 2);

  UTIL.startMiniCluster(3);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:17,代码来源:TestRestoreFlushSnapshotFromClient.java

示例2: loadProcedures

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
@Override
public void loadProcedures(Configuration conf) {
  loadUserProcedures(conf, REGIONSERVER_PROCEDURE_CONF_KEY);
  // load the default snapshot manager
  procedures.add(new RegionServerSnapshotManager());
  // load the default flush region procedure manager
  procedures.add(new RegionServerFlushTableProcedureManager());
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:9,代码来源:RegionServerProcedureManagerHost.java

示例3: initializeZooKeeper

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
/**
 * Bring up connection to zk ensemble and then wait until a master for this cluster and then after
 * that, wait until cluster 'up' flag has been set. This is the order in which master does things.
 * Finally put up a catalog tracker.
 * @throws IOException
 * @throws InterruptedException
 */
private void initializeZooKeeper() throws IOException, InterruptedException {
  // Open connection to zookeeper and set primary watcher
  this.zooKeeper = new ZooKeeperWatcher(conf, REGIONSERVER + ":" + this.isa.getPort(), this);

  // Create the master address manager, register with zk, and start it. Then
  // block until a master is available. No point in starting up if no master
  // running.
  this.masterAddressManager = new MasterAddressTracker(this.zooKeeper, this);
  this.masterAddressManager.start();
  blockAndCheckIfStopped(this.masterAddressManager);

  // Wait on cluster being up. Master will set this flag up in zookeeper
  // when ready.
  this.clusterStatusTracker = new ClusterStatusTracker(this.zooKeeper, this);
  this.clusterStatusTracker.start();
  blockAndCheckIfStopped(this.clusterStatusTracker);

  // Create the catalog tracker and start it;
  this.catalogTracker = new CatalogTracker(this.zooKeeper, this.conf, this);
  catalogTracker.start();

  // watch for snapshots
  try {
    this.snapshotManager = new RegionServerSnapshotManager(this);
  } catch (KeeperException e) {
    this.abort("Failed to reach zk cluster when creating snapshot handler.");
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:36,代码来源:HRegionServer.java

示例4: initializeZooKeeper

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
/**
 * Bring up connection to zk ensemble and then wait until a master for this
 * cluster and then after that, wait until cluster 'up' flag has been set.
 * This is the order in which master does things.
 * Finally put up a catalog tracker.
 * @throws IOException
 * @throws InterruptedException
 */
private void initializeZooKeeper() throws IOException, InterruptedException {
  // Open connection to zookeeper and set primary watcher
  this.zooKeeper = new ZooKeeperWatcher(conf, REGIONSERVER + ":" +
    this.isa.getPort(), this);

  // Create the master address manager, register with zk, and start it.  Then
  // block until a master is available.  No point in starting up if no master
  // running.
  this.masterAddressManager = new MasterAddressTracker(this.zooKeeper, this);
  this.masterAddressManager.start();
  blockAndCheckIfStopped(this.masterAddressManager);

  // Wait on cluster being up.  Master will set this flag up in zookeeper
  // when ready.
  this.clusterStatusTracker = new ClusterStatusTracker(this.zooKeeper, this);
  this.clusterStatusTracker.start();
  blockAndCheckIfStopped(this.clusterStatusTracker);

  // Create the catalog tracker and start it;
  this.catalogTracker = new CatalogTracker(this.zooKeeper, this.conf, this);
  catalogTracker.start();

  // watch for snapshots
  try {
    this.snapshotManager = new RegionServerSnapshotManager(this);
  } catch (KeeperException e) {
    this.abort("Failed to reach zk cluster when creating snapshot handler.");
  }
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:38,代码来源:HRegionServer.java

示例5: setupConf

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
protected static void setupConf(Configuration conf) {
  UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100);
  UTIL.getConfiguration().setInt("hbase.client.pause", 250);
  UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
  UTIL.getConfiguration().setBoolean(
      "hbase.master.enabletable.roundrobin", true);

  // Enable snapshot
  UTIL.getConfiguration().setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  UTIL.getConfiguration().setLong(RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_KEY,
    RegionServerSnapshotManager.SNAPSHOT_TIMEOUT_MILLIS_DEFAULT * 2);
}
 
开发者ID:apache,项目名称:hbase,代码行数:13,代码来源:TestRestoreFlushSnapshotFromClient.java

示例6: loadProcedures

import org.apache.hadoop.hbase.regionserver.snapshot.RegionServerSnapshotManager; //导入依赖的package包/类
@Override
public void loadProcedures(Configuration conf) {
  loadUserProcedures(conf, REGIONSERVER_PROCEDURE_CONF_KEY);
  // load the default snapshot manager
  procedures.add(new RegionServerSnapshotManager());
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:7,代码来源:RegionServerProcedureManagerHost.java


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