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


Java IntegrationTestingUtility.setUseDistributedCluster方法代码示例

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


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

示例1: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  int ret = ToolRunner.run(conf, new IntegrationTestReplication(), args);
  System.exit(ret);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:IntegrationTestReplication.java

示例2: runTestFromCommandLine

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
@Override
public int runTestFromCommandLine() throws Exception {
  IntegrationTestingUtility.setUseDistributedCluster(getConf());
  int numPresplits = getConf().getInt("loadmapper.numPresplits", 5);
  // create HTableDescriptor for specified table
  HTableDescriptor htd = new HTableDescriptor(getTablename());
  htd.addFamily(new HColumnDescriptor(TEST_FAMILY));

  Admin admin = new HBaseAdmin(getConf());
  try {
    admin.createTable(htd, Bytes.toBytes(0L), Bytes.toBytes(-1L), numPresplits);
  } finally {
    admin.close();
  }
  doLoad(getConf(), htd);
  doVerify(getConf(), htd);
  getTestingUtil(getConf()).deleteTable(htd.getName());
  return 0;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:IntegrationTestWithCellVisibilityLoadAndVerify.java

示例3: runTestFromCommandLine

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public int runTestFromCommandLine() throws Exception {
  IntegrationTestingUtility.setUseDistributedCluster(getConf());
  int numPresplits = getConf().getInt("loadmapper.numPresplits", 5);
  // create HTableDescriptor for specified table
  String table = getTablename();
  HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(table));
  htd.addFamily(new HColumnDescriptor(TEST_FAMILY));

  HBaseAdmin admin = new HBaseAdmin(getConf());
  try {
    admin.createTable(htd, Bytes.toBytes(0L), Bytes.toBytes(-1L), numPresplits);
  } finally {
    admin.close();
  }
  doLoad(getConf(), htd);
  doVerify(getConf(), htd);
  getTestingUtil(getConf()).deleteTable(htd.getName());
  return 0;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:20,代码来源:IntegrationTestWithCellVisibilityLoadAndVerify.java

示例4: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  String[] actualArgs = args;
  if (args.length > 0 && "-c".equals(args[0])) {
    int argCount = args.length - 2;
    if (argCount < 0) {
      throw new IllegalArgumentException("Missing path for -c parameter");
    }
    // load the resource specified by the second parameter
    conf.addResource(args[1]);
    actualArgs = new String[argCount];
    System.arraycopy(args, 2, actualArgs, 0, argCount);
  }
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  int ret = ToolRunner.run(conf, new ChaosMonkeyRunner(), actualArgs);
  System.exit(ret);
}
 
开发者ID:apache,项目名称:hbase,代码行数:18,代码来源:ChaosMonkeyRunner.java

示例5: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  int ret = ToolRunner.run(conf, new IntegrationTestTableSnapshotInputFormat(), args);
  System.exit(ret);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:IntegrationTestTableSnapshotInputFormat.java

示例6: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  util = new IntegrationTestingUtility(conf);
  // not using ToolRunner to avoid unnecessary call to setConf()
  args = new GenericOptionsParser(conf, args).getRemainingArgs();
  int status = new IntegrationTestImportTsv().run(args);
  System.exit(status);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:10,代码来源:IntegrationTestImportTsv.java

示例7: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration configuration = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(configuration);
  IntegrationTestZKAndFSPermissions tool = new IntegrationTestZKAndFSPermissions();
  int ret = ToolRunner.run(configuration, tool, args);
  System.exit(ret);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:IntegrationTestZKAndFSPermissions.java

示例8: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String args[]) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  int ret = ToolRunner.run(conf,
      new IntegrationTestTimeBoundedMultiGetRequestsWithRegionReplicas(), args);
  System.exit(ret);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:8,代码来源:IntegrationTestTimeBoundedMultiGetRequestsWithRegionReplicas.java

示例9: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  IntegrationTestingUtility util = new IntegrationTestingUtility(conf);
  util.initializeCluster(1);

  ChaosMonkey monkey = new ChaosMonkey(util);
  int ret = ToolRunner.run(conf, monkey, args);
  System.exit(ret);
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:11,代码来源:ChaosMonkey.java

示例10: runTestFromCommandLine

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public int runTestFromCommandLine() throws Exception {
  IntegrationTestingUtility.setUseDistributedCluster(getConf());
  boolean doLoad = false;
  boolean doVerify = false;
  boolean doDelete = getConf().getBoolean("loadmapper.deleteAfter",true);
  int numPresplits = getConf().getInt("loadmapper.numPresplits", 40);

  if (toRun.equals("load")) {
    doLoad = true;
  } else if (toRun.equals("verify")) {
    doVerify= true;
  } else if (toRun.equals("loadAndVerify")) {
    doLoad=true;
    doVerify= true;
  } else {
    System.err.println("Invalid argument " + toRun);
    usage();
    return 1;
  }

  // create HTableDescriptor for specified table
  String table = getTablename();
  HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(table));
  htd.addFamily(new HColumnDescriptor(TEST_FAMILY));

  HBaseAdmin admin = new HBaseAdmin(getConf());
  if (doLoad) {
    admin.createTable(htd, Bytes.toBytes(0L), Bytes.toBytes(-1L), numPresplits);
    doLoad(getConf(), htd);
  }
  if (doVerify) {
    doVerify(getConf(), htd);
    if (doDelete) {
      getTestingUtil(getConf()).deleteTable(htd.getName());
    }
  }
  return 0;
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:39,代码来源:IntegrationTestLoadAndVerify.java

示例11: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  // Run chaos monkeys 15 seconds, then stop them.
  // After 10 seconds, run chaos monkeys again.
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  int exitCode = ToolRunner.run(conf, new IntegrationTestMonkeys(), args);
  System.exit(exitCode);
}
 
开发者ID:apache,项目名称:hbase,代码行数:9,代码来源:IntegrationTestMonkeys.java

示例12: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  util = new IntegrationTestingUtility(conf);
  int status = ToolRunner.run(conf, new IntegrationTestImportTsv(), args);
  System.exit(status);
}
 
开发者ID:apache,项目名称:hbase,代码行数:8,代码来源:IntegrationTestImportTsv.java

示例13: Monkeys

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public Monkeys(Configuration conf) {
  this.conf = Preconditions.checkNotNull(conf, "Should specify a configuration");
  this.monkeyRunner = new ChaosMonkeyRunner();
  this.runner = () -> {
    try {
      monkeyRunner.getAndStartMonkey();
    } catch (Exception e) {
      LOG.error("Exception occured when running chaos monkeys: ", e);
    }
  };
  this.executor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder()
      .setDaemon(true).setNameFormat("ChaosMonkey").build());
  IntegrationTestingUtility.setUseDistributedCluster(this.conf);
}
 
开发者ID:apache,项目名称:hbase,代码行数:15,代码来源:Monkeys.java

示例14: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration conf = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(conf);
  IntegrationTestingUtility util = new IntegrationTestingUtility(conf);
  util.initializeCluster(1);

  ChaosMonkey monkey = new ChaosMonkey(util, EVERY_MINUTE_RANDOM_ACTION_POLICY);
  int ret = ToolRunner.run(conf, monkey, args);
  System.exit(ret);
}
 
开发者ID:zwqjsj0404,项目名称:HBase-Research,代码行数:11,代码来源:ChaosMonkey.java

示例15: main

import org.apache.hadoop.hbase.IntegrationTestingUtility; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
  Configuration configuration = HBaseConfiguration.create();
  IntegrationTestingUtility.setUseDistributedCluster(configuration);
  IntegrationTestSendTraceRequests tool = new IntegrationTestSendTraceRequests();
  ToolRunner.run(configuration, tool, args);
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:IntegrationTestSendTraceRequests.java


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