本文整理汇总了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);
}
示例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());
}
示例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.");
}
}
示例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.");
}
}
示例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);
}
示例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());
}