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