Class

com.twitter.scalding

IterableSource

Related Doc: package scalding

Permalink

case class IterableSource[+T](iter: Iterable[T], inFields: Fields = Fields.NONE)(implicit set: TupleSetter[T], conv: TupleConverter[T]) extends Source with Mappable[T] with Product with Serializable

Allows working with an iterable object defined in the job (on the submitter) to be used within a Job as you would a Pipe/RichPipe

These lists should probably be very tiny by Hadoop standards. If they are getting large, you should probably dump them to HDFS and use the normal mechanisms to address the data (a FileSource).

Source
IterableSource.scala
Linear Supertypes
Serializable, Product, Equals, Mappable[T], typed.TypedSource[T], Source, Serializable, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. IterableSource
  2. Serializable
  3. Product
  4. Equals
  5. Mappable
  6. TypedSource
  7. Source
  8. Serializable
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IterableSource(iter: Iterable[T], inFields: Fields = Fields.NONE)(implicit set: TupleSetter[T], conv: TupleConverter[T])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andThen[U](fn: (T) ⇒ U): typed.TypedSource[U]

    Permalink

    Transform this TypedSource into another by mapping after.

    Transform this TypedSource into another by mapping after. We don't call this map because of conflicts with Mappable, unfortunately

    Definition Classes
    TypedSource
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def checkFlowDefNotNull()(implicit flowDef: FlowDef, mode: Mode): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Source
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def converter[U >: T]: TupleConverter[U]

    Permalink

    Because TupleConverter cannot be covariant, we need to jump through this hoop.

    Because TupleConverter cannot be covariant, we need to jump through this hoop. A typical implementation might be: (implicit conv: TupleConverter[T]) and then:

    override def converter[U >: T] = TupleConverter.asSuperConverter[T, U](conv)

    Definition Classes
    IterableSourceTypedSource
  9. def createTap(readOrWrite: AccessMode)(implicit mode: Mode): Tap[_, _, _]

    Permalink

    Subclasses of Source MUST override this method.

    Subclasses of Source MUST override this method. They may call out to TestTapFactory for making Taps suitable for testing.

    Definition Classes
    IterableSourceSource
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def fields: Fields

    Permalink
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def flatMapTo[U](out: Fields)(mf: (T) ⇒ TraversableOnce[U])(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]): Pipe

    Permalink

    If you want to filter, you should use this and output a 0 or 1 length Iterable.

    If you want to filter, you should use this and output a 0 or 1 length Iterable. Filter does not change column names, and we generally expect to change columns here

    Definition Classes
    Mappable
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. val inFields: Fields

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. val iter: Iterable[T]

    Permalink
  18. final def mapTo[U](out: Fields)(mf: (T) ⇒ U)(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]): Pipe

    Permalink
    Definition Classes
    Mappable
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def read(implicit flowDef: FlowDef, mode: Mode): Pipe

    Permalink
    Definition Classes
    Source
  23. def sourceFields: Fields

    Permalink
    Definition Classes
    TypedSource
  24. val sourceId: String

    Permalink

    Don't use the whole string of the iterable, which can be huge.

    Don't use the whole string of the iterable, which can be huge. We take the first 10 items + the identityHashCode of the iter.

    Definition Classes
    IterableSourceSource
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toIterator(implicit config: Config, mode: Mode): Iterator[T]

    Permalink

    Allows you to read a Tap on the submit node NOT FOR USE IN THE MAPPERS OR REDUCERS.

    Allows you to read a Tap on the submit node NOT FOR USE IN THE MAPPERS OR REDUCERS. Typical use might be to read in Job.next to determine if another job is needed

    Definition Classes
    Mappable
  27. def transformForRead(pipe: Pipe): Pipe

    Permalink
    Attributes
    protected
    Definition Classes
    Source
  28. def transformForWrite(pipe: Pipe): Pipe

    Permalink
    Attributes
    protected
    Definition Classes
    Source
  29. def transformInTest: Boolean

    Permalink

    The mock passed in to scalding.JobTest may be considered as a mock of the Tap or the Source.

    The mock passed in to scalding.JobTest may be considered as a mock of the Tap or the Source. By default, as of 0.9.0, it is considered as a Mock of the Source. If you set this to true, the mock in TestMode will be considered to be a mock of the Tap (which must be transformed) and not the Source.

    Definition Classes
    Source
  30. def validateTaps(mode: Mode): Unit

    Permalink
    Definition Classes
    Source
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def writeFrom(pipe: Pipe)(implicit flowDef: FlowDef, mode: Mode): Pipe

    Permalink

    write the pipe but return the input so it can be chained into the next operation

    write the pipe but return the input so it can be chained into the next operation

    Definition Classes
    Source

Deprecated Value Members

  1. def readAtSubmitter[T](implicit mode: Mode, conv: TupleConverter[T]): Stream[T]

    Permalink
    Definition Classes
    Source
    Annotations
    @deprecated
    Deprecated

    (Since version 0.9.0) replace with Mappable.toIterator

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Mappable[T]

Inherited from typed.TypedSource[T]

Inherited from Source

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped