class Cascading::BaseTap

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.

Attributes

hadoop_tap[R]
local_tap[R]

Public Instance Methods

hadoop?() click to toggle source

Returns false if the #hadoop_tap is nil, true otherwise

# File lib/cascading/tap.rb, line 27
def hadoop?
  !hadoop_tap.nil?
end
local?() click to toggle source

Returns false if the #local_tap is nil, true otherwise

# File lib/cascading/tap.rb, line 22
def local?
  !local_tap.nil?
end
to_s() click to toggle source

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

Public Class Methods

new(local_tap, hadoop_tap) click to toggle source

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