The cascading.operation.Debug function is a
utility Function (actually, its a
Filter) that will print the current argument
Tuple to either stdout or stderr. Used with
the DebugLevel enum values
NONE, DEFAULT, or
VERBOSE, different debug levels can be embedded
in a pipe assembly.
Below we insert a Debug operation at the
VERBOSE level, but configure the planner to
remove all Debug operations from the resulting
Flow.
Pipe assembly = new Pipe( "assembly" ); // ... assembly = new Each( assembly, DebugLevel.VERBOSE, new Debug() ); // ... Properties properties = new Properties(); // tell the planner remove all Debug operations FlowConnector.setDebugLevel( properties, DebugLevel.NONE ); // ... FlowConnector flowConnector = new FlowConnector( properties ); Flow flow = flowConnector.connect( "debug", source, sink, assembly );
Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.