org.apache.hadoop.mapreduce.lib.output.MultipleOutputs.setCountersEnabled()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.apache.hadoop.mapreduce.lib.output.MultipleOutputs.setCountersEnabled()方法的一些代码示例,展示了MultipleOutputs.setCountersEnabled()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultipleOutputs.setCountersEnabled()方法的具体详情如下:
包路径:org.apache.hadoop.mapreduce.lib.output.MultipleOutputs
类名称:MultipleOutputs
方法名:setCountersEnabled

MultipleOutputs.setCountersEnabled介绍

[英]Enables or disables counters for the named outputs. The counters group is the MultipleOutputs class name. The names of the counters are the same as the named outputs. These counters count the number records written to each output name. By default these counters are disabled.
[中]启用或禁用命名输出的计数器。counters组是MultipleOutputs类名。计数器的名称与命名输出的名称相同。这些计数器统计写入每个输出名称的记录数。默认情况下,这些计数器被禁用。

代码示例

代码示例来源:origin: geftimov/hadoop-map-reduce-patterns

MultipleOutputs.setCountersEnabled(job, true);

代码示例来源:origin: apache/incubator-rya

/**
 * Set up the MapReduce job to output a schema (TBox).
 */
protected void configureSchemaOutput() {
  Path outPath = MRReasoningUtils.getSchemaPath(job.getConfiguration());
  SequenceFileOutputFormat.setOutputPath(job, outPath);
  job.setOutputFormatClass(SequenceFileOutputFormat.class);
  job.setOutputKeyClass(NullWritable.class);
  job.setOutputValueClass(SchemaWritable.class);
  LazyOutputFormat.setOutputFormatClass(job, SequenceFileOutputFormat.class);
  MultipleOutputs.addNamedOutput(job, "schemaobj",
    SequenceFileOutputFormat.class, NullWritable.class, SchemaWritable.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.DEBUG_OUT,
    TextOutputFormat.class, Text.class, Text.class);
  MultipleOutputs.setCountersEnabled(job, true);
}

代码示例来源:origin: geftimov/hadoop-map-reduce-patterns

MultipleOutputs.setCountersEnabled(binningJob, true);

代码示例来源:origin: apache/incubator-rya

baseOutputPath = filesOutputPath;
LazyOutputFormat.setOutputFormatClass(job, AccumuloFileOutputFormat.class);
MultipleOutputs.setCountersEnabled(job, true);

代码示例来源:origin: com.conversantmedia/mara-core

if (!configured.contains(name)) {
  MultipleOutputs.addNamedOutput(job, name, namedOut.format(), keyClass, valueClass);
  MultipleOutputs.setCountersEnabled(job, namedOut.countersEnabled());
  configured.add(name);

代码示例来源:origin: apache/incubator-rya

/**
 * Set up a MapReduce job to output human-readable text.
 */
protected void configureTextOutput(String destination) {
  Path outPath;
  outPath = MRReasoningUtils.getOutputPath(job.getConfiguration(), destination);
  TextOutputFormat.setOutputPath(job, outPath);
  LazyOutputFormat.setOutputFormatClass(job, TextOutputFormat.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.INTERMEDIATE_OUT,
    TextOutputFormat.class, NullWritable.class, Text.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.TERMINAL_OUT,
    TextOutputFormat.class, NullWritable.class, Text.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.SCHEMA_OUT,
    TextOutputFormat.class, NullWritable.class, Text.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.INCONSISTENT_OUT,
    TextOutputFormat.class, NullWritable.class, Text.class);
  MultipleOutputs.addNamedOutput(job, MRReasoningUtils.DEBUG_OUT,
    TextOutputFormat.class, Text.class, Text.class);
  MultipleOutputs.setCountersEnabled(job, true);
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test

SequenceFileOutputFormat.class, IntWritable.class, Text.class);
MultipleOutputs.setCountersEnabled(job, withCounters);

代码示例来源:origin: apache/incubator-rya

MultipleOutputs.addNamedOutput(job, MRReasoningUtils.INCONSISTENT_OUT,
  SequenceFileOutputFormat.class, Derivation.class, NullWritable.class);
MultipleOutputs.setCountersEnabled(job, true);

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

Long.class, String.class);
MultipleOutputs.setCountersEnabled(job, withCounters);

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient

SequenceFileOutputFormat.class, IntWritable.class, Text.class);
MultipleOutputs.setCountersEnabled(job, withCounters);

相关文章