@InterfaceAudience.Public
@InterfaceStability.Evolving
public abstract class SimpleProcessor
extends org.apache.tez.runtime.api.AbstractLogicalIOProcessor
AbstractLogicalIOProcessor
and provides empty
implementations of most methods and handles input/output initialization.
This can be used to implement simple Processor
s that dont need to
do event handling etc.Modifier and Type | Field and Description |
---|---|
protected Map<String,org.apache.tez.runtime.api.LogicalInput> |
inputs |
protected Map<String,org.apache.tez.runtime.api.LogicalOutput> |
outputs |
Constructor and Description |
---|
SimpleProcessor(org.apache.tez.runtime.api.ProcessorContext context) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Map<String,org.apache.tez.runtime.api.LogicalInput> |
getInputs() |
Map<String,org.apache.tez.runtime.api.LogicalOutput> |
getOutputs() |
void |
handleEvents(List<org.apache.tez.runtime.api.Event> processorEvents) |
void |
initialize() |
protected void |
postOp()
Called after
run() is called and can be used to
do post-processing like committing output etc |
protected void |
preOp()
Implements input/output initialization.
|
abstract void |
run()
Users must implement this method to provide the main
application logic code
|
void |
run(Map<String,org.apache.tez.runtime.api.LogicalInput> _inputs,
Map<String,org.apache.tez.runtime.api.LogicalOutput> _outputs) |
public SimpleProcessor(org.apache.tez.runtime.api.ProcessorContext context)
public void run(Map<String,org.apache.tez.runtime.api.LogicalInput> _inputs, Map<String,org.apache.tez.runtime.api.LogicalOutput> _outputs) throws Exception
Exception
public abstract void run() throws Exception
Exception
protected void preOp() throws Exception
run()
is called.Exception
protected void postOp() throws Exception
run()
is called and can be used to
do post-processing like committing output etcException
public void initialize() throws Exception
initialize
in interface org.apache.tez.runtime.api.ProcessorFrameworkInterface
initialize
in class org.apache.tez.runtime.api.AbstractLogicalIOProcessor
Exception
public void handleEvents(List<org.apache.tez.runtime.api.Event> processorEvents)
Copyright © 2016 Apache Software Foundation. All rights reserved.