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


Java HadoopTestCase.LOCAL_MR属性代码示例

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


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

示例1: HiveTestBase

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,代码行数:26,代码来源:HiveTestBase.java

示例2: TestKeyFieldBasedComparator

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,代码行数:6,代码来源:TestKeyFieldBasedComparator.java

示例3: TestMultithreadedMapper

public TestMultithreadedMapper() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestMultithreadedMapper.java

示例4: TestMRKeyFieldBasedComparator

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,代码行数:5,代码来源:TestMRKeyFieldBasedComparator.java

示例5: TestMRMultipleOutputs

public TestMRMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestMRMultipleOutputs.java

示例6: TestChainErrors

public TestChainErrors() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestChainErrors.java

示例7: TestSingleElementChain

public TestSingleElementChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestSingleElementChain.java

示例8: TestMapReduceChain

public TestMapReduceChain() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestMapReduceChain.java

示例9: TestMultipleInputs

public TestMultipleInputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestMultipleInputs.java

示例10: TestMapReduceJobControl

public TestMapReduceJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR , HadoopTestCase.LOCAL_FS, 2, 2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:3,代码来源:TestMapReduceJobControl.java

示例11: TestMultipleOutputs

public TestMultipleOutputs() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:3,代码来源:TestMultipleOutputs.java

示例12: TestKeyFieldBasedComparator

public TestKeyFieldBasedComparator() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 1, 1);
  conf = createJobConf();
  localConf = createJobConf();
  localConf.set("map.output.key.field.separator", " ");
}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:6,代码来源:TestKeyFieldBasedComparator.java

示例13: TestLocalJobControl

/**
 * Initialises a new instance of this test case to use a Local MR cluster and
 * a local filesystem.
 * 
 * @throws IOException If an error occurs initialising this object.
 */
public TestLocalJobControl() throws IOException {
  super(HadoopTestCase.LOCAL_MR, HadoopTestCase.LOCAL_FS, 2, 2);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:TestLocalJobControl.java


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