A BaseTap wraps up a pair of Cascading taps, one for Cascading local mode and the other for Hadoop mode. Note that these are optional, but at least one must be provided for most taps. A SequenceFile is a notable example of a Scheme for which there is no Cascading local mode version, so a Tap you build with it will have no local_tap.
Returns false if the #hadoop_tap is nil, true otherwise
# File lib/cascading/tap.rb, line 27 def hadoop? !hadoop_tap.nil? end
Returns false if the #local_tap is nil, true otherwise
# File lib/cascading/tap.rb, line 22 def local? !local_tap.nil? end
Passes through printing the #local_tap and #hadoop_tap
# File lib/cascading/tap.rb, line 17 def to_s "Local: #{local_tap}, Hadoop: #{hadoop_tap}" end
Constructor that accepts the #local_tap and #hadoop_tap, which may be nil
# File lib/cascading/tap.rb, line 11 def initialize(local_tap, hadoop_tap) @local_tap = local_tap @hadoop_tap = hadoop_tap end