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


Java HadoopTestCase类代码示例

本文整理汇总了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?
    }
}
 
开发者ID:jmrozanec,项目名称:hive-unit,代码行数:27,代码来源:HiveTestBase.java

示例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, " ");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:TestKeyFieldBasedComparator.java

示例3: TestChild

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestChild() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestChild.java

示例4: TestNoJobSetupCleanup

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestNoJobSetupCleanup() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestNoJobSetupCleanup.java

示例5: TestMultithreadedMapper

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMultithreadedMapper() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestMultithreadedMapper.java

示例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, " ");
}
 
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:TestMRKeyFieldBasedComparator.java

示例7: TestMRMultipleOutputs

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMRMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestMRMultipleOutputs.java

示例8: TestChainErrors

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestChainErrors() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestChainErrors.java

示例9: TestSingleElementChain

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestSingleElementChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestSingleElementChain.java

示例10: TestMapReduceChain

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMapReduceChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestMapReduceChain.java

示例11: TestMultipleInputs

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMultipleInputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestMultipleInputs.java

示例12: TestMapReduceJobControl

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestMapReduceJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestMapReduceJobControl.java

示例13: TestTaskContext

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public TestTaskContext() throws IOException {
  super(HadoopTestCase.CLUSTER_MR , HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:4,代码来源:TestTaskContext.java

示例14: DataStoreMapReduceTestBase

import org.apache.hadoop.mapred.HadoopTestCase; //导入依赖的package包/类
public DataStoreMapReduceTestBase() throws IOException {
  this(HadoopTestCase.CLUSTER_MR, HadoopTestCase.DFS_FS, 2, 2);
}
 
开发者ID:jianglibo,项目名称:gora-boot,代码行数:4,代码来源:DataStoreMapReduceTestBase.java


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