• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java EchoUserResolver类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.apache.hadoop.mapred.gridmix.EchoUserResolver的典型用法代码示例。如果您正苦于以下问题:Java EchoUserResolver类的具体用法?Java EchoUserResolver怎么用?Java EchoUserResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

EchoUserResolver类属于org.apache.hadoop.mapred.gridmix包,在下文中一共展示了EchoUserResolver类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testGenerateDataWithSERIALSubmission

点赞 3

import org.apache.hadoop.mapred.gridmix.EchoUserResolver; //导入依赖的package包/类
/**
 * Generate the data in a SERIAL submission policy with EchoUserResolver
 * mode and also set the no.of bytes per file in the data.Verify whether each 
 * file size matches with given per file size or not and also 
 * verify the overall size of generated data.
 * @throws Exception
 */
@Test
public void testGenerateDataWithSERIALSubmission() throws Exception {
  conf = rtClient.getDaemonConf();
  int perNodeSize = 500; // 500 mb per node data
  final long inputSize = cSize * perNodeSize;
  String [] runtimeValues ={"LOADJOB",
     EchoUserResolver.class.getName(),
     "SERIAL",
     inputSize + "m",
     "file:///dev/null"};
  int bytesPerFile = 200; // 200 mb per file of data
  String [] otherArgs = {
    "-D", GridMixConfig.GRIDMIX_BYTES_PER_FILE + 
    "=" + (bytesPerFile * 1024 * 1024)
  };
  int exitCode = UtilsForGridmix.runGridmixJob(gridmixDir, 
     conf,GridMixRunMode.DATA_GENERATION, runtimeValues,otherArgs);
  Assert.assertEquals("Data generation has failed.", 0 , exitCode);
  LOG.info("Verify the eache file size in a generate data.");
  verifyEachNodeSize(new Path(gridmixDir,"input"));
  verifyNumOfFilesGeneratedInEachNode(new Path(gridmixDir,"input"), 
     perNodeSize, bytesPerFile);
  checkGeneratedDataAndJobStatus(inputSize);
}
 

开发者ID:Nextzero,
项目名称:hadoop-2.6.0-cdh5.4.3,
代码行数:32,
代码来源:TestGridMixDataGeneration.java

示例2: testGenerateDataWithSERIALSubmission

点赞 2

import org.apache.hadoop.mapred.gridmix.EchoUserResolver; //导入依赖的package包/类
/**
 * Generate the data in a SERIAL submission policy with EchoUserResolver
 * mode and also set the no.of bytes per file in the data.Verify whether each 
 * file size matches with given per file size or not and also 
 * verify the overall size of generated data.
 * @throws Exception
 */
@Test
public void testGenerateDataWithSERIALSubmission() throws Exception {
  conf = rtClient.getDaemonConf();
  long perNodeSizeInMB = 500; // 500 mb per node data
  final long inputSizeInMB = cSize * perNodeSizeInMB;
  String [] runtimeValues ={"LOADJOB", 
                            EchoUserResolver.class.getName(), 
                            "SERIAL", 
                            inputSizeInMB + "m", 
                            "file:///dev/null"};
  long bytesPerFile = 200  * 1024 * 1024; // 200 mb per file of data
  String [] otherArgs = {
      "-D", GridMixConfig.GRIDMIX_BYTES_PER_FILE + "=" + bytesPerFile, 
      "-D", GridMixConfig.GRIDMIX_DISTCACHE_ENABLE + "=false", 
      "-D", GridMixConfig.GRIDMIX_COMPRESSION_ENABLE + "=false"
  };
  int exitCode = 
      UtilsForGridmix.runGridmixJob(gridmixDir, conf, 
          GridMixRunMode.DATA_GENERATION.getValue(), 
          runtimeValues, otherArgs);
  Assert.assertEquals("Data generation has failed.", 0 , exitCode);
  LOG.info("Verify the eache file size in a generate data.");
  verifyEachNodeSize(new Path(gridmixDir, "input"), perNodeSizeInMB);
  verifyNumOfFilesGeneratedInEachNode(new Path(gridmixDir, "input"), 
                                      perNodeSizeInMB, bytesPerFile);
  checkGeneratedDataAndJobStatus(inputSizeInMB);
}
 

开发者ID:rekhajoshm,
项目名称:mapreduce-fork,
代码行数:35,
代码来源:TestGridMixDataGeneration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)