本文整理汇总了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.
}
示例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"));
}
示例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.
}
示例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.
}
示例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.
}
示例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.
}
示例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.
}
示例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.
}
示例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.
}
示例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.
}