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


Java ConstantSizeRegionSplitPolicy类代码示例

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


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

示例1: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // enable snapshot support
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around
  // some files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  conf.setInt("hbase.regionserver.msginterval", 100);
  conf.setBoolean("hbase.master.enabletable.roundrobin", true);
  // Avoid potentially aggressive splitting which would cause snapshot to fail
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:TestSnapshotMetadata.java

示例2: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:17,代码来源:TestSnapshotFromClient.java

示例3: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 2);
  conf.setInt("hbase.hstore.compactionThreshold", 5);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
  conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
  conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());

}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:22,代码来源:TestSnapshotFromMaster.java

示例4: setUpCluster

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
@Override
public void setUpCluster() throws Exception {
  // Set small flush size for minicluster so we exercise reseeking scanners
  util = getTestingUtil(getConf());
  util.initializeCluster(SERVER_COUNT);
  conf = getConf();
  conf.set(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, String.valueOf(128*1024));
  // prevent aggressive region split
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
          ConstantSizeRegionSplitPolicy.class.getName());
  this.setConf(util.getConfiguration());

  // replace the HBaseTestingUtility in the unit test with the integration test's
  // IntegrationTestingUtility
  tag = new TestAcidGuarantees();
  tag.setHBaseTestingUtil(util);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:18,代码来源:IntegrationTestAcidGuarantees.java

示例5: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // drop the number of attempts for the hbase admin
  conf.setInt("hbase.client.retries.number", 1);
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  // prevent aggressive region split
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:20,代码来源:TestSnapshotFromClient.java

示例6: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 3);
  conf.setInt("hbase.hstore.compactionThreshold", 5);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // drop the number of attempts for the hbase admin
  conf.setInt("hbase.client.retries.number", 1);
  // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
  conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
  conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);

  // prevent aggressive region split
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:25,代码来源:TestSnapshotFromMaster.java

示例7: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 3);
  conf.setInt("hbase.hstore.compactionThreshold", 5);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
  conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
  conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());

}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:22,代码来源:TestSnapshotFromMaster.java

示例8: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
static void setupConf(Configuration conf) {
  // Up the handlers; this test needs more than usual.
  conf.setInt(HConstants.REGION_SERVER_HIGH_PRIORITY_HANDLER_COUNT, 15);
  // enable snapshot support
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around
  // some files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  conf.setInt("hbase.regionserver.msginterval", 100);
  conf.setBoolean("hbase.master.enabletable.roundrobin", true);
  // Avoid potentially aggressive splitting which would cause snapshot to fail
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
      ConstantSizeRegionSplitPolicy.class.getName());
  // Execute cleaner frequently to induce failures
  conf.setInt("hbase.master.cleaner.interval", CLEANER_INTERVAL);
  conf.setInt("hbase.master.hfilecleaner.plugins.snapshot.period", CLEANER_INTERVAL);
  // Effectively disable TimeToLiveHFileCleaner. Don't want to fully disable it because that
  // will even trigger races between creating the directory containing back references and
  // the back reference itself.
  conf.setInt("hbase.master.hfilecleaner.ttl", CLEANER_INTERVAL);
}
 
开发者ID:apache,项目名称:hbase,代码行数:27,代码来源:TestSnapshotCloneIndependence.java

示例9: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
protected static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
      ConstantSizeRegionSplitPolicy.class.getName());

}
 
开发者ID:apache,项目名称:hbase,代码行数:18,代码来源:TestSnapshotFromClient.java

示例10: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 2);
  conf.setInt("hbase.hstore.compactionThreshold", 5);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", blockingStoreFiles);
  // Ensure no extra cleaners on by default (e.g. TimeToLiveHFileCleaner)
  conf.set(HFileCleaner.MASTER_HFILE_CLEANER_PLUGINS, "");
  conf.set(HConstants.HBASE_MASTER_LOGCLEANER_PLUGINS, "");
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.setLong(SnapshotHFileCleaner.HFILE_CACHE_REFRESH_PERIOD_CONF_KEY, cacheRefreshPeriod);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
    ConstantSizeRegionSplitPolicy.class.getName());
  conf.setInt("hbase.hfile.compactions.cleaner.interval", 20 * 1000);

}
 
开发者ID:apache,项目名称:hbase,代码行数:23,代码来源:TestSnapshotFromMaster.java

示例11: setupTable

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
private Table setupTable(TableName tableName) throws Exception {
  TableDescriptorBuilder builder = TableDescriptorBuilder.newBuilder(tableName);
  // Flush many files, but do not compact immediately
  // Make sure that the region does not split
  builder
      .setMemStoreFlushSize(5000)
      .setRegionSplitPolicyClassName(ConstantSizeRegionSplitPolicy.class.getName())
      .setMaxFileSize(100 * 1024 * 1024)
      .setValue("hbase.hstore.compactionThreshold", "250");

  TableDescriptor td = builder.build();
  byte[] fam = Bytes.toBytes("fam");
  Table table = TEST_UTIL.createTable(td, new byte[][] {fam},
      TEST_UTIL.getConfiguration());
  TEST_UTIL.loadTable(table, fam);
  return table;
}
 
开发者ID:apache,项目名称:hbase,代码行数:18,代码来源:TestRegionSnapshotTask.java

示例12: setupConf

import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; //导入依赖的package包/类
protected static void setupConf(Configuration conf) {
  // disable the ui
  conf.setInt("hbase.regionsever.info.port", -1);
  // change the flush size to a small amount, regulating number of store files
  conf.setInt("hbase.hregion.memstore.flush.size", 25000);
  // so make sure we get a compaction when doing a load, but keep around some
  // files in the store
  conf.setInt("hbase.hstore.compaction.min", 10);
  conf.setInt("hbase.hstore.compactionThreshold", 10);
  // block writes if we get to 12 store files
  conf.setInt("hbase.hstore.blockingStoreFiles", 12);
  // Enable snapshot
  conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
  conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
      ConstantSizeRegionSplitPolicy.class.getName());
}
 
开发者ID:apache,项目名称:hbase,代码行数:17,代码来源:TestFlushSnapshotFromClient.java


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