Class: Cascading::MultiTap

Inherits:
BaseTap
  • Object
show all
Defined in:
lib/cascading/tap.rb

Overview

A MultiTap represents one of Cascading’s aggregate taps and is built via static constructors that accept an array of Taps. In order for a mode (Cascading local or Hadoop) to be supported, all provided taps must support it.

Instance Attribute Summary

Attributes inherited from BaseTap

#hadoop_tap, #local_tap

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseTap

#hadoop?, #local?, #to_s

Constructor Details

#initialize(local_tap, hadoop_tap) ⇒ MultiTap

Do not call this constructor directly; instead, use one of MultiTap.multi_source_tap or MultiTap.multi_sink_tap.



78
79
80
# File 'lib/cascading/tap.rb', line 78

def initialize(local_tap, hadoop_tap)
  super(local_tap, hadoop_tap)
end

Class Method Details

.multi_sink_tap(taps) ⇒ Object

Static constructor that builds a MultiTap wrapping a c.t.MultiSinkTap from the given array of Taps. The resulting MultiTap will only be available in Cascading local mode or Hadoop mode if all input taps support them.



93
94
95
# File 'lib/cascading/tap.rb', line 93

def self.multi_sink_tap(taps)
  multi_tap(taps, Java::CascadingTap::MultiSinkTap)
end

.multi_source_tap(taps) ⇒ Object

Static constructor that builds a MultiTap wrapping a c.t.MultiSourceTap from the given array of Taps. The resulting MultiTap will only be available in Cascading local mode or Hadoop mode if all input taps support them.



86
87
88
# File 'lib/cascading/tap.rb', line 86

def self.multi_source_tap(taps)
  multi_tap(taps, Java::CascadingTap::MultiSourceTap)
end