本文整理汇总了Java中org.apache.hadoop.mapred.HadoopTestCase类的典型用法代码示例。如果您正苦于以下问题:Java HadoopTestCase类的具体用法?Java HadoopTestCase怎么用?Java HadoopTestCase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HadoopTestCase类属于org.apache.hadoop.mapred包,在下文中一共展示了HadoopTestCase类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: HiveTestBase
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public HiveTestBase() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
Map<String, String> env = new HashMap<String, String>();
env.putAll(System.getenv());
if (System.getenv("HADOOP_HOME") == null) {
String shome = System.getProperty("user.home");
if (shome != null) {
File hadoopHome = new File(new File(shome, "hadoop"), "hadoop-1.2.1_local");
if (hadoopHome.exists()) {
env.put("HADOOP_HOME", hadoopHome.getAbsolutePath());
EnvironmentHack.setEnv(env);
LOGGER.info(String.format("HADOOP_HOME was set by hiveunit to %1$s.", System.getenv("HADOOP_HOME")));
}
File target = new File("target/hadoop-1.2.1");
if (target.exists()) {
env.put("HADOOP_HOME", target.getAbsolutePath());
EnvironmentHack.setEnv(env);
LOGGER.info(String.format("HADOOP_HOME was set by hiveunit to %1$s.", System.getenv("HADOOP_HOME")));
}
} else {
LOGGER.info(String.format("HADOOP_HOME was found in environment as %1$s. Using that for hiveunit.", System.getenv("HADOOP_HOME")));
}
//detect variable or hadoop in path and throw exception here?
}
}
示例2: TestKeyFieldBasedComparator
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestKeyFieldBasedComparator() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
conf = createJobConf();
localConf = createJobConf();
localConf.set(JobContext.MAP_OUTPUT_KEY_FIELD_SEPERATOR, " ");
}
示例3: TestChild
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestChild() throws IOException {
super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
示例4: TestNoJobSetupCleanup
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestNoJobSetupCleanup() throws IOException {
super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
示例5: TestMultithreadedMapper
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMultithreadedMapper() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例6: TestMRKeyFieldBasedComparator
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMRKeyFieldBasedComparator() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
conf = createJobConf();
conf.set(MRJobConfig.MAP_OUTPUT_KEY_FIELD_SEPERATOR, " ");
}
示例7: TestMRMultipleOutputs
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMRMultipleOutputs() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例8: TestChainErrors
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestChainErrors() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例9: TestSingleElementChain
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestSingleElementChain() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例10: TestMapReduceChain
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMapReduceChain() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例11: TestMultipleInputs
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMultipleInputs() throws IOException {
super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
示例12: TestMapReduceJobControl
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMapReduceJobControl() throws IOException {
super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
示例13: TestTaskContext
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestTaskContext() throws IOException {
super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 1, 1);
}
示例14: DataStoreMapReduceTestBase
import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public DataStoreMapReduceTestBase() throws IOException {
this(HadoopTestCase.CLUSTER_MR, HadoopTestCase.DFS_FS, 2, 2);
}