public class Debug extends BaseOperation<Long> implements Filter<Long>, PlannedOperation<Long>
Filter
that will never remove an item from a stream, but will print the Tuple to either
stdout or stderr.
Currently, if printFields is true, they will print every 10 Tuples.
The frequency that fields and tuples are printed can be set via setPrintFieldsEvery(int)
and
setPrintTupleEvery(int)
methods, respectively.Modifier and Type | Class and Description |
---|---|
static class |
Debug.Output |
fieldDeclaration, numArgs, trace
Constructor and Description |
---|
Debug()
Constructor Debug creates a new Debug instance that prints to stderr by default, and does not print
the Tuple instance field names.
|
Debug(boolean printFields)
Constructor Debug creates a new Debug instance that prints to stderr and will print the current
Tuple instance field names if printFields is true.
|
Debug(Debug.Output output)
Constructor Debug creates a new Debug instance that prints to the declared stream and does not print the Tuple
field names.
|
Debug(Debug.Output output,
boolean printFields)
Constructor Debug creates a new Debug instance that prints to the declared stream and will print the Tuple instances
field names if printFields is true.
|
Debug(Debug.Output output,
String prefix)
Constructor Debug creates a new Debug instance that prints to the declared stream and does not print the Tuple
field names.
|
Debug(Debug.Output output,
String prefix,
boolean printFields)
Constructor Debug creates a new Debug instance that prints to the declared stream and will print the Tuple instances
field names if printFields is true.
|
Debug(String prefix)
Constructor Debug creates a new Debug instance that prints to stderr by default, and does not print
the Tuple instance field names.
|
Debug(String prefix,
boolean printFields)
Constructor Debug creates a new Debug instance that prints to stderr and will print the current
Tuple instance field names if printFields is true.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup(FlowProcess flowProcess,
OperationCall<Long> longOperationCall)
Method cleanup does nothing, and may safely be overridden.
|
boolean |
equals(Object object) |
Debug.Output |
getOutput() |
String |
getPrefix() |
int |
getPrintFieldsEvery()
Method getPrintFieldsEvery returns the printFieldsEvery interval value of this Debug object.
|
int |
getPrintTupleEvery()
Method getPrintTupleEvery returns the printTupleEvery interval value of this Debug object.
|
int |
hashCode() |
boolean |
isPrintFields() |
boolean |
isRemove(FlowProcess flowProcess,
FilterCall<Long> filterCall)
Method isRemove returns true if input should be removed from the tuple stream.
|
void |
prepare(FlowProcess flowProcess,
OperationCall<Long> operationCall)
Method prepare does nothing, and may safely be overridden.
|
void |
setPrintFieldsEvery(int printFieldsEvery)
Method setPrintFieldsEvery sets the printFieldsEvery interval value of this Debug object.
|
void |
setPrintTupleEvery(int printTupleEvery)
Method setPrintTupleEvery sets the printTupleEvery interval value of this Debug object.
|
boolean |
supportsPlannerLevel(PlannerLevel plannerLevel) |
flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
flush, getFieldDeclaration, getNumArgs, isSafe
public Debug()
@ConstructorProperties(value="prefix") public Debug(String prefix)
prefix
- of type String@ConstructorProperties(value={"prefix","printFields"}) public Debug(String prefix, boolean printFields)
prefix
- of type StringprintFields
- of type boolean@ConstructorProperties(value="printFields") public Debug(boolean printFields)
printFields
- of type boolean@ConstructorProperties(value="output") public Debug(Debug.Output output)
output
- of type Output@ConstructorProperties(value={"output","prefix"}) public Debug(Debug.Output output, String prefix)
output
- of type Outputprefix
- of type String@ConstructorProperties(value={"output","prefix","printFields"}) public Debug(Debug.Output output, String prefix, boolean printFields)
output
- of type Outputprefix
- of type StringprintFields
- of type boolean@ConstructorProperties(value={"output","printFields"}) public Debug(Debug.Output output, boolean printFields)
output
- of type OutputprintFields
- of type booleanpublic Debug.Output getOutput()
public boolean isPrintFields()
public int getPrintFieldsEvery()
public void setPrintFieldsEvery(int printFieldsEvery)
printFieldsEvery
- the printFieldsEvery of this Debug object.public int getPrintTupleEvery()
public void setPrintTupleEvery(int printTupleEvery)
printTupleEvery
- the printTupleEvery of this Debug object.public boolean supportsPlannerLevel(PlannerLevel plannerLevel)
supportsPlannerLevel
in interface PlannedOperation<Long>
public void prepare(FlowProcess flowProcess, OperationCall<Long> operationCall)
BaseOperation
public boolean isRemove(FlowProcess flowProcess, FilterCall<Long> filterCall)
Filter
isRemove
in interface Filter<Long>
flowProcess
- of type FlowProcessfilterCall
- of type FilterCallFilter.isRemove(cascading.flow.FlowProcess, FilterCall)
public void cleanup(FlowProcess flowProcess, OperationCall<Long> longOperationCall)
BaseOperation
public boolean equals(Object object)
equals
in class BaseOperation<Long>
public int hashCode()
hashCode
in class BaseOperation<Long>
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.