Java 类org.apache.hadoop.mapred.HadoopTestCase 实例源码

项目:hive-unit    文件:HiveTestBase.java   
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?
    }
}
项目:hadoop    文件:TestKeyFieldBasedComparator.java   
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, " ");
}
项目:hadoop    文件:TestChild.java   
public TestChild() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:hadoop    文件:TestNoJobSetupCleanup.java   
public TestNoJobSetupCleanup() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:hadoop    文件:TestMultithreadedMapper.java   
public TestMultithreadedMapper() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestMRKeyFieldBasedComparator.java   
public TestMRKeyFieldBasedComparator() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
  conf = createJobConf();
  conf.set(MRJobConfig.MAP_OUTPUT_KEY_FIELD_SEPERATOR, " ");
}
项目:hadoop    文件:TestMRMultipleOutputs.java   
public TestMRMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestChainErrors.java   
public TestChainErrors() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestSingleElementChain.java   
public TestSingleElementChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestMapReduceChain.java   
public TestMapReduceChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestMultipleInputs.java   
public TestMultipleInputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:hadoop    文件:TestMapReduceJobControl.java   
public TestMapReduceJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:hadoop    文件:TestTaskContext.java   
public TestTaskContext() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestKeyFieldBasedComparator.java   
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, " ");
}
项目:aliyun-oss-hadoop-fs    文件:TestChild.java   
public TestChild() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:aliyun-oss-hadoop-fs    文件:TestNoJobSetupCleanup.java   
public TestNoJobSetupCleanup() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:aliyun-oss-hadoop-fs    文件:TestMultithreadedMapper.java   
public TestMultithreadedMapper() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestMRKeyFieldBasedComparator.java   
public TestMRKeyFieldBasedComparator() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
  conf = createJobConf();
  conf.set(MRJobConfig.MAP_OUTPUT_KEY_FIELD_SEPERATOR, " ");
}
项目:aliyun-oss-hadoop-fs    文件:TestMRMultipleOutputs.java   
public TestMRMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestChainErrors.java   
public TestChainErrors() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestSingleElementChain.java   
public TestSingleElementChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestMapReduceChain.java   
public TestMapReduceChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestMultipleInputs.java   
public TestMultipleInputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:aliyun-oss-hadoop-fs    文件:TestMapReduceJobControl.java   
public TestMapReduceJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:aliyun-oss-hadoop-fs    文件:TestTaskContext.java   
public TestTaskContext() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestKeyFieldBasedComparator.java   
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, " ");
}
项目:big-c    文件:TestChild.java   
public TestChild() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:big-c    文件:TestNoJobSetupCleanup.java   
public TestNoJobSetupCleanup() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:big-c    文件:TestMultithreadedMapper.java   
public TestMultithreadedMapper() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestMRKeyFieldBasedComparator.java   
public TestMRKeyFieldBasedComparator() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
  conf = createJobConf();
  conf.set(MRJobConfig.MAP_OUTPUT_KEY_FIELD_SEPERATOR, " ");
}
项目:big-c    文件:TestMRMultipleOutputs.java   
public TestMRMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestChainErrors.java   
public TestChainErrors() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestSingleElementChain.java   
public TestSingleElementChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestMapReduceChain.java   
public TestMapReduceChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestMultipleInputs.java   
public TestMultipleInputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:big-c    文件:TestMapReduceJobControl.java   
public TestMapReduceJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
项目:big-c    文件:TestTaskContext.java   
public TestTaskContext() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 1, 1);
}
项目:gora-boot    文件:DataStoreMapReduceTestBase.java   
public DataStoreMapReduceTestBase() throws IOException {
  this(HadoopTestCase.CLUSTER_MR, HadoopTestCase.DFS_FS, 2, 2);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestKeyFieldBasedComparator.java   
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, " ");
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestChild.java   
public TestChild() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}