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


Java Environment类代码示例

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


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

示例1: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expect("mapreduce_jobtracker_address", "local");
  //expect("mapred_local_dir", "build/test/mapred/local");
  expectDefined("mapreduce_cluster_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapreduce_job_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapreduce_job_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapreduce_task_ismap", "false");
  expectDefined("mapreduce_task_attempt_id");

  expectDefined("mapreduce_task_io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:TrAppReduce.java

示例2: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expectDefined("mapreduce_cluster_local_dir");
  expect("mapreduce_map_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapreduce_map_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapreduce_task_ismap", "true");
  expectDefined("mapreduce_task_attempt_id");

  expectDefined("mapreduce_map_input_file");
  expectDefined("mapreduce_map_input_length");

  expectDefined("mapreduce_task_io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

  // verify some deprecated properties appear for older stream jobs
  expect("map_input_file", env.getProperty("mapreduce_map_input_file"));
  expect("map_input_length", env.getProperty("mapreduce_map_input_length"));
}
 
开发者ID:naver,项目名称:hadoop,代码行数:26,代码来源:TrApp.java

示例3: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expect("mapred_job_tracker", "local");
  //expect("mapred_local_dir", "build/test/mapred/local");
  expectDefined("mapred_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapred_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapred_task_is_map", "false");
  expectDefined("mapred_task_id");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

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

示例4: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expectDefined("mapred_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapred_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapred_task_is_map", "true");
  expectDefined("mapred_task_id");

  expectDefined("map_input_file");
  expectDefined("map_input_length");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

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

示例5: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expect("mapred_job_tracker", "local");
  //expect("mapred_local_dir", "build/test/mapred/local");
  expectDefined("mapred_local_dir");
  Set<String> output_classes = new HashSet<String>();
  output_classes.add("org.apache.hadoop.io.BytesWritable");
  output_classes.add("org.apache.hadoop.io.Text");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", output_classes);
  expect("mapred_output_value_class", output_classes);

  expect("mapred_task_is_map", "false");
  expectDefined("mapred_task_id");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:26,代码来源:TrAppReduce.java

示例6: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expectDefined("mapred_local_dir");
  Set<String> output_classes = new HashSet<String>();
  output_classes.add("org.apache.hadoop.io.BytesWritable");
  output_classes.add("org.apache.hadoop.io.Text");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", output_classes);
  expect("mapred_output_value_class", output_classes);

  expect("mapred_task_is_map", "true");
  expectDefined("mapred_task_id");

  expectDefined("map_input_file");
  expectDefined("map_input_length");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:27,代码来源:TrApp.java

示例7: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expectDefined("mapreduce_cluster_local_dir");
  expect("mapreduce_map_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapreduce_map_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapreduce_task_ismap", "true");
  expectDefined("mapreduce_task_attempt_id");

  expectDefined("mapreduce_map_input_file");
  expectDefined("mapreduce_map_input_length");

  expectDefined("mapreduce_task_io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:23,代码来源:TrApp.java

示例8: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expect("mapred_job_tracker", "local");
  //expect("mapred_local_dir", "build/test/mapred/local");
  expectDefined("mapred_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapred_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapred_task_is_map", "true");
  expectDefined("mapred_task_id");

  expectDefined("map_input_file");
  expect("map_input_start", "0");
  expectDefined("map_input_length");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:thisisvoa,项目名称:hadoop-0.20,代码行数:27,代码来源:TrApp.java

示例9: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expectDefined("mapreduce_cluster_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapreduce_map_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapreduce_map_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapreduce_task_ismap", "true");
  expectDefined("mapreduce_task_attempt_id");

  expectDefined("mapreduce_map_input_file");
  expectDefined("mapreduce_map_input_length");

  expectDefined("mapreduce_task_io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

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

示例10: testParentJobConfToEnvVars

import org.apache.hadoop.streaming.Environment; //导入依赖的package包/类
void testParentJobConfToEnvVars() throws IOException
{
  env = new Environment();
  // test that some JobConf properties are exposed as expected     
  // Note the dots translated to underscore: 
  // property names have been escaped in PipeMapRed.safeEnvVarName()
  expect("mapred_input_format_class", "org.apache.hadoop.mapred.TextInputFormat");
  expect("mapred_job_tracker", "local");
  //expect("mapred_local_dir", "build/test/mapred/local");
  expectDefined("mapred_local_dir");
  expect("mapred_output_format_class", "org.apache.hadoop.mapred.TextOutputFormat");
  expect("mapred_output_key_class", "org.apache.hadoop.io.Text");
  expect("mapred_output_value_class", "org.apache.hadoop.io.Text");

  expect("mapred_task_is_map", "true");
  expectDefined("mapred_task_id");

  expectDefined("map_input_file");
  expect("map_input_start", "0");
  expectDefined("map_input_length");

  expectDefined("io_sort_factor");

  // the FileSplit context properties are not available in local hadoop..
  // so can't check them in this test.

}
 
开发者ID:rhli,项目名称:hadoop-EAR,代码行数:28,代码来源:TrApp.java


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