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


Java SecIndexLoadBalancer类代码示例

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


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

示例1: postDeleteTableHandler

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@Override
public void postDeleteTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
    TableName tableName) throws IOException {
  LOG.info("Entered into postDeleteTableHandler of table " + tableName + '.');
  MasterServices master = ctx.getEnvironment().getMasterServices();
  TableName indexTableName = TableName.valueOf(IndexUtils.getIndexTableName(tableName));
  boolean indexTablePresent =
      master.getAssignmentManager().getZKTable().isTablePresent(indexTableName);
  // Not checking for disabled state because before deleting user table both user and index table
  // should be disabled.
  if ((!IndexUtils.isIndexTable(tableName)) && indexTablePresent) {
    LoadBalancer balancer = master.getAssignmentManager().getBalancer();
    if (balancer instanceof SecIndexLoadBalancer) {
      ((SecIndexLoadBalancer) balancer).removeIndexedTable(tableName);
    }
    DeleteTableHandler dth = new DeleteTableHandler(indexTableName, master, master);
    dth.prepare();
    dth.process();
  }
  LOG.info("Exiting from postDeleteTableHandler of table " + tableName + '.');
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:22,代码来源:IndexMasterObserver.java

示例2: before

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void before() throws Exception {
  Configuration conf = TESTING_UTIL.getConfiguration();
  conf.setInt("hbase.balancer.period", 60000);
  // Needed because some tests have splits happening on RS that are killed
  // We don't want to wait 3min for the master to figure it out
  conf.setInt("hbase.master.assignment.timeoutmonitor.timeout", 4000);
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setInt("hbase.hstore.compactionThreshold",5);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  TESTING_UTIL.startMiniCluster(NB_SERVERS);
  
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:18,代码来源:TestScanWhenTTLExpired.java

示例3: preCreateTableHandler

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@Override
public void preCreateTableHandler(ObserverContext<MasterCoprocessorEnvironment> ctx,
    HTableDescriptor desc, HRegionInfo[] regions) throws IOException {
  if (desc.getValue(Constants.INDEX_SPEC_KEY) != null) {
    LoadBalancer balancer =
        ctx.getEnvironment().getMasterServices().getAssignmentManager().getBalancer();
    if (balancer instanceof SecIndexLoadBalancer) {
      ((SecIndexLoadBalancer) balancer).addIndexedTable(desc.getTableName());
    }
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:12,代码来源:IndexMasterObserver.java

示例4: setUpBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setUpBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(2);
  admin = new IndexAdmin(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:13,代码来源:TestSecIndexColocator.java

示例5: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(1);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:12,代码来源:TestIndexMapReduceUtil.java

示例6: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.setBoolean(HConstants.REGIONSERVER_INFO_PORT_AUTO,true);
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set("index.data.block.encoding.algo", "PREFIX");
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(1);
  admin = new IndexAdmin(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:14,代码来源:TestIndexMasterObserver.java

示例7: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, LocalIndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:11,代码来源:TestForComplexIssues.java

示例8: TestAcidGuaranteesForIndex

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
public TestAcidGuaranteesForIndex() {
  // Set small flush size for minicluster so we exercise reseeking scanners
  Configuration conf = HBaseConfiguration.create();
  conf.set(HConstants.HREGION_MEMSTORE_FLUSH_SIZE, String.valueOf(128 * 1024));
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  util = new HBaseTestingUtility(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:12,代码来源:TestAcidGuaranteesForIndex.java

示例9: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, MockIndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(1);
  admin = new IndexAdmin(conf);
  
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:14,代码来源:TestIndexPutsWithRegionServerRestart.java

示例10: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, MockIndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  conf.setInt("hbase.hstore.compactionThreshold",5);
  UTIL.startMiniCluster(1);
  admin = new IndexAdmin(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:14,代码来源:TestIndexRegionObserver.java

示例11: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(1);
  admin = new IndexAdmin(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:13,代码来源:TestIndexRegionObserverForScan.java

示例12: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  UTIL.startMiniCluster(1);
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  admin = new IndexAdmin(conf);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:12,代码来源:TestMultipleIndicesInScan.java

示例13: setupBeforeClass

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
@BeforeClass
public static void setupBeforeClass() throws Exception {
  Configuration conf = UTIL.getConfiguration();
  conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, IndexMasterObserver.class.getName());
  conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, IndexRegionObserver.class.getName());
  conf.set(CoprocessorHost.WAL_COPROCESSOR_CONF_KEY, IndexWALObserver.class.getName());
  conf.setBoolean("hbase.use.secondary.index", true);
  conf.set("index.data.block.encoding.algo", "PREFIX");
  conf.setClass(HConstants.HBASE_MASTER_LOADBALANCER_CLASS, SecIndexLoadBalancer.class,
    LoadBalancer.class);
  UTIL.startMiniCluster(1);
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:13,代码来源:TestIndexHalfStoreFileReaderWithEncoding.java

示例14: clearRegionPlans

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
private void clearRegionPlans(HMaster master, String tableName) {
  AssignmentManager am = master.getAssignmentManager();
  if (am.getBalancer() instanceof SecIndexLoadBalancer) {
    ((SecIndexLoadBalancer) am.getBalancer()).clearTableRegionPlans(tableName);
  }
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:7,代码来源:IndexMasterObserver.java

示例15: clearRegionPlans

import org.apache.hadoop.hbase.index.SecIndexLoadBalancer; //导入依赖的package包/类
private void clearRegionPlans(HMaster master, String tableName) {
  ((SecIndexLoadBalancer) master.getBalancer()).clearTableRegionPlans(tableName);
}
 
开发者ID:Huawei-Hadoop,项目名称:hindex,代码行数:4,代码来源:IndexMasterObserver.java


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