本文整理了Java中org.apache.hadoop.mapreduce.Mapper.run()
方法的一些代码示例,展示了Mapper.run()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mapper.run()
方法的具体详情如下:
包路径:org.apache.hadoop.mapreduce.Mapper
类名称:Mapper
方法名:run
[英]Expert users can override this method for more complete control over the execution of the Mapper.
[中]专家用户可以覆盖此方法,以便更完整地控制映射器的执行。
代码示例来源:origin: apache/ignite
/** {@inheritDoc} */
@Override public void run(Context ctx) throws IOException, InterruptedException {
try {
super.run(ctx);
}
catch (HadoopTaskCancelledException e) {
cancelledTasks.incrementAndGet();
throw e;
}
}
代码示例来源:origin: apache/ignite
mapper.run(new WrappedMapper().getMapContext(hadoopCtx));
代码示例来源:origin: asakusafw/asakusafw
/**
* Invokes {@code Mapper#run(Context)} internally.
* Clients can override this method and implement customized {@code run} method.
* @param context current context
* @throws IOException if task is failed by I/O error
* @throws InterruptedException if task execution is interrupted
*/
protected void runInternal(Context context) throws IOException, InterruptedException {
super.run(context);
}
代码示例来源:origin: ShifuML/shifu
@Override
public void run() {
try {
mapper.run(subcontext);
} catch (Throwable ie) {
throwable = ie;
} finally {
try {
reader.close();
} catch (IOException ignore) {
}
}
}
}
代码示例来源:origin: ShifuML/shifu
@Override
public void run() {
try {
mapper.run(subcontext);
} catch (Throwable ie) {
throwable = ie;
} finally {
try {
reader.close();
} catch (IOException ignore) {
}
}
}
}
代码示例来源:origin: com.datasalt.pangool/pangool-core
@Override
public void run(Context context) throws IOException, InterruptedException {
// Find the InputProcessor from the TaggedInputSplit.
if(delegate == null) {
TaggedInputSplit inputSplit = (TaggedInputSplit) context.getInputSplit();
log.info("[profile] Got input split. Going to look at DC.");
delegate = InstancesDistributor.loadInstance(context.getConfiguration(),
Mapper.class, inputSplit.getInputProcessorFile(), true);
log.info("[profile] Finished. Calling run() on delegate.");
}
delegate.run(context);
}
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
public void run(Context context)
throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
}
代码示例来源:origin: datasalt/pangool
@Override
public void run(Context context) throws IOException, InterruptedException {
// Find the InputProcessor from the TaggedInputSplit.
if(delegate == null) {
TaggedInputSplit inputSplit = (TaggedInputSplit) context.getInputSplit();
log.info("[profile] Got input split. Going to look at DC.");
delegate = InstancesDistributor.loadInstance(context.getConfiguration(),
Mapper.class, inputSplit.getInputProcessorFile(), true);
log.info("[profile] Finished. Calling run() on delegate.");
}
delegate.run(context);
}
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
public void run(Context context)
throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
public void run(Context context)
throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
@SuppressWarnings("unchecked")
public void run(Context context)
throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
@SuppressWarnings("unchecked")
public void run(Context context)
throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
}
代码示例来源:origin: asakusafw/asakusafw
@Override
public void run(Context context) throws IOException, InterruptedException {
setup(context);
mapper.run(context);
cleanup(context);
}
代码示例来源:origin: com.conversantmedia/mara-core
@Override
public void run(Context context) throws IOException, InterruptedException {
setup(context);
getDelegate(context).run(context);
cleanup(context);
}
代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
代码示例来源:origin: org.apache.hadoop/hadoop-mapred
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
代码示例来源:origin: io.hops/hadoop-mapreduce-client-core
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
代码示例来源:origin: lintool/warcbase
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
代码示例来源:origin: io.prestosql.hadoop/hadoop-apache
@SuppressWarnings("unchecked")
void runMapper(TaskInputOutputContext context, int index) throws IOException,
InterruptedException {
Mapper mapper = mappers.get(index);
RecordReader rr = new ChainRecordReader(context);
RecordWriter rw = new ChainRecordWriter(context);
Mapper.Context mapperContext = createMapContext(rr, rw, context,
getConf(index));
mapper.run(mapperContext);
rr.close();
rw.close(context);
}
内容来源于网络,如有侵权,请联系作者删除!