本文整理了Java中org.apache.hadoop.mapred.lib.MultipleOutputs.getCollector()
方法的一些代码示例,展示了MultipleOutputs.getCollector()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MultipleOutputs.getCollector()
方法的具体详情如下:
包路径:org.apache.hadoop.mapred.lib.MultipleOutputs
类名称:MultipleOutputs
方法名:getCollector
[英]Gets the output collector for a multi named output.
[中]获取多名称输出的输出收集器。
代码示例来源:origin: uk.bl.wa.discovery/warc-hadoop-recordreaders
@SuppressWarnings("unchecked")
private OutputCollector<Text, Text> getCollector(String fp, String fp2,
Reporter reporter) throws IOException {
return mos.getCollector(fp, fp2, reporter);
}
代码示例来源:origin: ukwa/webarchive-discovery
@SuppressWarnings("unchecked")
private OutputCollector<Text, Text> getCollector(String fp, String fp2,
Reporter reporter) throws IOException {
return mos.getCollector(fp, fp2, reporter);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
/**
* Gets the output collector for a named output.
*
* @param namedOutput the named output name
* @param reporter the reporter
* @return the output collector for the given named output
* @throws IOException thrown if output collector could not be created
*/
@SuppressWarnings({"unchecked"})
public OutputCollector getCollector(String namedOutput, Reporter reporter)
throws IOException {
return getCollector(namedOutput, null, reporter);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
/**
* Gets the output collector for a named output.
*
* @param namedOutput the named output name
* @param reporter the reporter
* @return the output collector for the given named output
* @throws IOException thrown if output collector could not be created
*/
@SuppressWarnings({"unchecked"})
public OutputCollector getCollector(String namedOutput, Reporter reporter)
throws IOException {
return getCollector(namedOutput, null, reporter);
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
/**
* Gets the output collector for a named output.
*
* @param namedOutput the named output name
* @param reporter the reporter
* @return the output collector for the given named output
* @throws IOException thrown if output collector could not be created
*/
@SuppressWarnings({"unchecked"})
public OutputCollector getCollector(String namedOutput, Reporter reporter)
throws IOException {
return getCollector(namedOutput, null, reporter);
}
代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core
/**
* Gets the output collector for a named output.
* <p/>
*
* @param namedOutput the named output name
* @param reporter the reporter
* @return the output collector for the given named output
* @throws IOException thrown if output collector could not be created
*/
@SuppressWarnings({"unchecked"})
public OutputCollector getCollector(String namedOutput, Reporter reporter)
throws IOException {
return getCollector(namedOutput, null, reporter);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
/**
* Gets the output collector for a named output.
*
* @param namedOutput the named output name
* @param reporter the reporter
* @return the output collector for the given named output
* @throws IOException thrown if output collector could not be created
*/
@SuppressWarnings({"unchecked"})
public OutputCollector getCollector(String namedOutput, Reporter reporter)
throws IOException {
return getCollector(namedOutput, null, reporter);
}
代码示例来源:origin: 01org/graphbuilder
@Override
public void reduce(IntWritable key, Iterator<Text> iter,
OutputCollector<Text, Text> out, Reporter reporter) throws IOException {
OutputCollector<Text, Text> mout = mos.getCollector(
"vidhashmap" + key.get(), reporter);
while (iter.hasNext()) {
Text line = iter.next();
mout.collect(null, line);
}
}
代码示例来源:origin: org.apache.mahout/mahout-mr
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, VectorWritable rhat)
throws IOException {
outputs.getCollector(OUTPUT_RHAT, null).collect(rHatKey, rhat);
rHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: org.apache.mahout/mahout-core
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, VectorWritable rhat)
throws IOException {
outputs.getCollector(OUTPUT_RHAT, null).collect(rHatKey, rhat);
rHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: org.apache.mahout/mahout-core
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, DenseBlockWritable dbw)
throws IOException {
outputs.getCollector(OUTPUT_QHAT, null).collect(qHatKey, dbw);
qHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: org.apache.mahout/mahout-mrlegacy
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, DenseBlockWritable dbw)
throws IOException {
outputs.getCollector(OUTPUT_QHAT, null).collect(qHatKey, dbw);
qHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: org.apache.mahout/mahout-mrlegacy
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, VectorWritable rhat)
throws IOException {
outputs.getCollector(OUTPUT_RHAT, null).collect(rHatKey, rhat);
rHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: org.apache.mahout/mahout-mr
@Override
@SuppressWarnings("unchecked")
public void collect(Writable nil, DenseBlockWritable dbw)
throws IOException {
outputs.getCollector(OUTPUT_QHAT, null).collect(qHatKey, dbw);
qHatKey.incrementItemOrdinal();
}
};
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient
public void map(LongWritable key, Text value,
OutputCollector<Long, String> output,
Reporter reporter)
throws IOException {
if (!value.toString().equals("a")) {
output.collect(key.get(), value.toString());
} else {
mos.getCollector("text", reporter).collect(key, "text");
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient
public void map(LongWritable key, Text value,
OutputCollector<LongWritable, Text> output,
Reporter reporter)
throws IOException {
if (!value.toString().equals("a")) {
output.collect(key, value);
} else {
mos.getCollector("text", reporter).collect(key, new Text("text"));
mos.getCollector("sequence", "A", reporter).collect(key,
new Text("sequence"));
mos.getCollector("sequence", "B", reporter).collect(key,
new Text("sequence"));
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-jobclient
public void reduce(Long key, Iterator<String> values,
OutputCollector<Long, String> output,
Reporter reporter)
throws IOException {
while (values.hasNext()) {
String value = values.next();
if (!value.equals("b")) {
output.collect(key, value);
} else {
mos.getCollector("text", reporter).collect(key, "text");
}
}
}
代码示例来源:origin: org.apache.mahout/mahout-core
@SuppressWarnings("unchecked")
private void outputQRow(Writable key, Vector qRow, Vector aRow) throws IOException {
if (nv && (aRow instanceof NamedVector)) {
qRowValue.set(new NamedVector(qRow, ((NamedVector) aRow).getName()));
} else {
qRowValue.set(qRow);
}
outputs.getCollector(OUTPUT_Q, null).collect(key, qRowValue);
}
}
代码示例来源:origin: org.apache.mahout/mahout-mrlegacy
@SuppressWarnings("unchecked")
private void outputQRow(Writable key, Vector qRow, Vector aRow) throws IOException {
if (nv && (aRow instanceof NamedVector)) {
qRowValue.set(new NamedVector(qRow, ((NamedVector) aRow).getName()));
} else {
qRowValue.set(qRow);
}
outputs.getCollector(OUTPUT_Q, null).collect(key, qRowValue);
}
}
代码示例来源:origin: org.apache.mahout/mahout-mr
@SuppressWarnings("unchecked")
private void outputQRow(Writable key, Vector qRow, Vector aRow) throws IOException {
if (nv && (aRow instanceof NamedVector)) {
qRowValue.set(new NamedVector(qRow, ((NamedVector) aRow).getName()));
} else {
qRowValue.set(qRow);
}
outputs.getCollector(OUTPUT_Q, null).collect(key, qRowValue);
}
}
内容来源于网络,如有侵权,请联系作者删除!