cascading.operation

## Class Debug

- java.lang.Object
- - cascading.operation.BaseOperation<java.lang.Long>
  - - cascading.operation.Debug

- All Implemented Interfaces:
    DeclaresResults, Filter<java.lang.Long>, Operation<java.lang.Long>, PlannedOperation<java.lang.Long>, Traceable, java.io.Serializable

      public class Debug
      extends BaseOperation<java.lang.Long>
      implements Filter<java.lang.Long>, PlannedOperation<java.lang.Long>

  Class Debug is a `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.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Debug.Output`

  - ### Field Summary

    - ### Fields inherited from class cascading.operation.BaseOperation

      `fieldDeclaration, numArgs, trace`

    - ### Fields inherited from interface cascading.operation.Operation

      `ANY`

  - ### Constructor Summary

    Constructors
    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, java.lang.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, java.lang.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(java.lang.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(java.lang.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.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanup(FlowProcess flowProcess, OperationCall<java.lang.Long> longOperationCall)` Method cleanup does nothing, and may safely be overridden.
    `boolean` | `equals(java.lang.Object object)`
    `Debug.Output` | `getOutput()`
    `java.lang.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<java.lang.Long> filterCall)` Method isRemove returns true if input should be removed from the tuple stream.
    `void` | `prepare(FlowProcess flowProcess, OperationCall<java.lang.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)`

    - ### Methods inherited from class cascading.operation.BaseOperation

      `flush, getFieldDeclaration, getNumArgs, getTrace, isSafe, printOperationInternal, toString, toStringInternal`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface cascading.operation.Operation

      `flush, getFieldDeclaration, getNumArgs, isSafe`

- - ### Constructor Detail

    - #### Debug

          public Debug()

      Constructor Debug creates a new Debug instance that prints to stderr by default, and does not print the Tuple instance field names.

    - #### Debug

          @ConstructorProperties(value="prefix")
          public Debug(java.lang.String prefix)

      Constructor Debug creates a new Debug instance that prints to stderr by default, and does not print the Tuple instance field names.
      Parameters:
        `prefix` - of type String

    - #### Debug

          @ConstructorProperties(value={"prefix","printFields"})
          public Debug(java.lang.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.
      Parameters:
        `prefix` - of type String
        `printFields` - of type boolean

    - #### Debug

          @ConstructorProperties(value="printFields")
          public 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.
      Parameters:
        `printFields` - of type boolean

    - #### Debug

          @ConstructorProperties(value="output")
          public 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.
      Parameters:
        `output` - of type Output

    - #### Debug

          @ConstructorProperties(value={"output","prefix"})
          public Debug(Debug.Output output,
                                     java.lang.String prefix)

      Constructor Debug creates a new Debug instance that prints to the declared stream and does not print the Tuple field names.
      Parameters:
        `output` - of type Output
        `prefix` - of type String

    - #### Debug

          @ConstructorProperties(value={"output","prefix","printFields"})
          public Debug(Debug.Output output,
                                     java.lang.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.
      Parameters:
        `output` - of type Output
        `prefix` - of type String
        `printFields` - of type boolean

    - #### Debug

          @ConstructorProperties(value={"output","printFields"})
          public 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.
      Parameters:
        `output` - of type Output
        `printFields` - of type boolean

  - ### Method Detail

    - #### getOutput

          public Debug.Output getOutput()

    - #### getPrefix

          public java.lang.String getPrefix()

    - #### isPrintFields

          public boolean isPrintFields()

    - #### getPrintFieldsEvery

          public int getPrintFieldsEvery()

      Method getPrintFieldsEvery returns the printFieldsEvery interval value of this Debug object.
      Returns:
        the printFieldsEvery (type int) of this Debug object.

    - #### setPrintFieldsEvery

          public void setPrintFieldsEvery(int printFieldsEvery)

      Method setPrintFieldsEvery sets the printFieldsEvery interval value of this Debug object.
      Parameters:
        `printFieldsEvery` - the printFieldsEvery of this Debug object.

    - #### getPrintTupleEvery

          public int getPrintTupleEvery()

      Method getPrintTupleEvery returns the printTupleEvery interval value of this Debug object.
      Returns:
        the printTupleEvery (type int) of this Debug object.

    - #### setPrintTupleEvery

          public void setPrintTupleEvery(int printTupleEvery)

      Method setPrintTupleEvery sets the printTupleEvery interval value of this Debug object.
      Parameters:
        `printTupleEvery` - the printTupleEvery of this Debug object.

    - #### supportsPlannerLevel

          public boolean supportsPlannerLevel(PlannerLevel plannerLevel)

      Specified by:
        `supportsPlannerLevel` in interface `PlannedOperation<java.lang.Long>`

    - #### prepare

          public void prepare(FlowProcess flowProcess,
                     OperationCall<java.lang.Long> operationCall)

      Description copied from class: `BaseOperation`
      Method prepare does nothing, and may safely be overridden.
      Specified by:
        `prepare` in interface `Operation<java.lang.Long>`
      Overrides:
        `prepare` in class `BaseOperation<java.lang.Long>`

    - #### isRemove

          public boolean isRemove(FlowProcess flowProcess,
                         FilterCall<java.lang.Long> filterCall)

      Description copied from interface: `Filter`
      Method isRemove returns true if input should be removed from the tuple stream.
      Specified by:
        `isRemove` in interface `Filter<java.lang.Long>`
      Parameters:
        `flowProcess` - of type FlowProcess
        `filterCall` - of type FilterCall
      Returns:
        boolean
      See Also:
        `Filter.isRemove(cascading.flow.FlowProcess, FilterCall)`

    - #### cleanup

          public void cleanup(FlowProcess flowProcess,
                     OperationCall<java.lang.Long> longOperationCall)

      Description copied from class: `BaseOperation`
      Method cleanup does nothing, and may safely be overridden.
      Specified by:
        `cleanup` in interface `Operation<java.lang.Long>`
      Overrides:
        `cleanup` in class `BaseOperation<java.lang.Long>`

    - #### equals

          public boolean equals(java.lang.Object object)

      Overrides:
        `equals` in class `BaseOperation<java.lang.Long>`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `BaseOperation<java.lang.Long>`

Copyright © 2007-2015 Xplenty, Inc. All Rights Reserved.