com.twitter.scalding

Job

class Job extends FieldConversions with Serializable

Job is a convenience class to make using Scalding easier. Subclasses of Job automatically have a number of nice implicits to enable more concise syntax, including: conversion from Pipe, Source or Iterable to RichPipe conversion from Source or Iterable to Pipe conversion to collections or Tuple[1-22] to cascading.tuple.Fields

Additionally, the job provides an implicit Mode and FlowDef so that functions that register starts or ends of a flow graph, specifically anything that reads or writes data on Hadoop, has the needed implicits available.

If you want to write code outside of a Job, you will want to either:

make all methods that may read or write data accept implicit FlowDef and Mode parameters.

OR:

write code that rather than returning values, it returns a (FlowDef, Mode) => T, these functions can be combined Monadically using algebird.monad.Reader.

Linear Supertypes
Serializable, FieldConversions, LowPriorityFieldConversions, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Job
  2. Serializable
  3. FieldConversions
  4. LowPriorityFieldConversions
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Job(args: Args)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit def _implicitJobArgs: Args

    Attributes
    protected
  7. def anyToFieldArg(f: Any): Comparable[_]

    Attributes
    protected
    Definition Classes
    LowPriorityFieldConversions
  8. val args: Args

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def asList(f: Fields): List[Comparable[_]]

    Definition Classes
    FieldConversions
  11. def asSet(f: Fields): Set[Comparable[_]]

    Definition Classes
    FieldConversions
  12. def buildFlow: Flow[_]

    combine the config, flowDef and the Mode to produce a flow

  13. def classIdentifier: String

  14. def clear(): Unit

  15. def clone(nextargs: Args): Job

    Copy this job By default, this uses reflection and the single argument Args constructor

  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def config: Map[AnyRef, AnyRef]

    This is the exact config that is passed to the Cascading FlowConnector.

    This is the exact config that is passed to the Cascading FlowConnector. By default: if there are no spill thresholds in mode.config, we replace with defaultSpillThreshold we overwrite io.serializations with ioSerializations we overwrite cascading.tuple.element.comparator.default to defaultComparator we add some scalding keys for debugging/logging

    Tip: override this method, call super, and ++ your additional map to add or overwrite more options

    This returns Map[AnyRef, AnyRef] for compatibility with older code

  18. implicit def dateParser: DateParser

    Override this to control how dates are parsed

  19. def defaultComparator: Option[Class[_ <: Comparator[_]]]

    Override this if you want to customize comparisons/hashing for your job the config method overwrites using this before sending to cascading The one we use by default is needed used to make Joins in the Fields-API more robust to Long vs Int differences.

    Override this if you want to customize comparisons/hashing for your job the config method overwrites using this before sending to cascading The one we use by default is needed used to make Joins in the Fields-API more robust to Long vs Int differences. If you only use the Typed-API, consider changing this to return None

  20. def defaultMode(fromFields: Fields, toFields: Fields): Fields

    Rather than give the full power of cascading's selectors, we have a simpler set of rules encoded below: 1) if the input is non-definite (ALL, GROUP, ARGS, etc.

    Rather than give the full power of cascading's selectors, we have a simpler set of rules encoded below: 1) if the input is non-definite (ALL, GROUP, ARGS, etc...) ALL is the output. Perhaps only fromFields=ALL will make sense 2) If one of from or to is a strict super set of the other, SWAP is used. 3) If they are equal, REPLACE is used. 4) Otherwise, ALL is used.

    Definition Classes
    FieldConversions
  21. def defaultSpillThreshold: Int

    Keep 100k tuples in memory by default before spilling Turn this up as high as you can without getting OOM.

    Keep 100k tuples in memory by default before spilling Turn this up as high as you can without getting OOM.

    This is ignored if there is a value set in the incoming jobConf on Hadoop

  22. final def ensureUniqueFields(left: Fields, right: Fields, rightPipe: Pipe): (Fields, Pipe)

    Definition Classes
    FieldConversions
  23. implicit def enumValueToFields(x: Value): Fields

    Definition Classes
    FieldConversions
  24. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  26. implicit def fieldFields[T <: TraversableOnce[Field[_]]](f: T): RichFields

    Definition Classes
    FieldConversions
  27. implicit def fieldToFields(f: Field[_]): RichFields

    Definition Classes
    FieldConversions
  28. implicit def fields[T <: TraversableOnce[Symbol]](f: T): Fields

    Definition Classes
    FieldConversions
  29. implicit def fieldsToRichFields(fields: Fields): RichFields

    We can't set the field Manifests because cascading doesn't (yet) expose field type information in the Fields API.

    We can't set the field Manifests because cascading doesn't (yet) expose field type information in the Fields API.

    Definition Classes
    FieldConversions
  30. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  31. implicit val flowDef: FlowDef

    Attributes
    protected
  32. implicit def fromEnum[T <: Enumeration](enumeration: T): Fields

    Multi-entry fields.

    Multi-entry fields. This are higher priority than Product conversions so that List will not conflict with Product.

    Definition Classes
    FieldConversions
  33. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  34. def getField(f: Fields, idx: Int): Fields

    Definition Classes
    FieldConversions
  35. def handleStats(statsData: CascadingStats): Unit

    Attributes
    protected
  36. def hasInts(f: Fields): Boolean

    Definition Classes
    FieldConversions
  37. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  38. implicit def intFields[T <: TraversableOnce[Int]](f: T): Fields

    Definition Classes
    FieldConversions
  39. implicit def intToFields(x: Int): Fields

    Definition Classes
    FieldConversions
  40. implicit def integerToFields(x: Integer): Fields

    Definition Classes
    FieldConversions
  41. def ioSerializations: List[Class[_ <: Serialization[_]]]

    These are user-defined serializations IN-ADDITION to (but deduped) with the required serializations

  42. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  43. implicit def iterableToRichPipe[T](iter: Iterable[T])(implicit set: TupleSetter[T], conv: TupleConverter[T]): RichPipe

  44. def keepAlive(): Unit

    Use this if a map or reduce phase takes a while before emitting tuples.

  45. def listeners: List[FlowListener]

  46. implicit def mode: Mode

  47. def name: String

  48. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  49. final def newSymbol(avoid: Set[Symbol], guess: Symbol, trial: Int = 0): Symbol

    Definition Classes
    FieldConversions
    Annotations
    @tailrec()
  50. def next: Option[Job]

    Implement this method if you want some other jobs to run after the current job.

    Implement this method if you want some other jobs to run after the current job. These will not execute until the current job has run successfully.

  51. final def notify(): Unit

    Definition Classes
    AnyRef
  52. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  53. implicit def parseAnySeqToFields[T <: TraversableOnce[Any]](anyf: T): Fields

    Useful to convert f : Any* to Fields.

    Useful to convert f : Any* to Fields. This handles mixed cases ("hey", 'you). Not sure we should be this flexible, but given that Cascading will throw an exception before scheduling the job, I guess this is okay.

    Definition Classes
    FieldConversions
  54. implicit def pipeToRichPipe(pipe: Pipe): RichPipe

    you should never call this directly, it is here to make the DSL work.

    you should never call this directly, it is here to make the DSL work. Just know, you can treat a Pipe as a RichPipe within a Job

  55. implicit def productToFields(f: Product): Fields

    Handles treating any TupleN as a Fields object.

    Handles treating any TupleN as a Fields object. This is low priority because List is also a Product, but this method will not work for List (because List is Product2(head, tail) and so productIterator won't work as expected. Lists are handled by an implicit in FieldConversions, which have higher priority.

    Definition Classes
    LowPriorityFieldConversions
  56. implicit def read(src: Source): Pipe

    This is implicit so that a Source can be used as the argument to a join or other method that accepts Pipe.

  57. def run(): Boolean

  58. implicit def scaldingConfig: Config

    This is here so that Mappable.

    This is here so that Mappable.toIterator can find an implicit config

    Attributes
    protected
  59. def skipStrategy: Option[FlowSkipStrategy]

  60. implicit def sourceToRichPipe(src: Source): RichPipe

    This implicit is to enable RichPipe methods directly on Source objects, such as map/flatMap, etc.

    This implicit is to enable RichPipe methods directly on Source objects, such as map/flatMap, etc...

    Note that Mappable is a subclass of Source, and Mappable already has mapTo and flatMapTo BUT WITHOUT incoming fields used (see the Mappable trait). This creates some confusion when using these methods (this is an unfortunate mistake in our design that was not noticed until later). To remove ambiguity, explicitly call .read on any Source that you begin operating with a mapTo/flatMapTo.

  61. def stepListeners: List[FlowStepListener]

  62. def stepStrategy: Option[FlowStepStrategy[_]]

    Specify a callback to run before the start of each flow step.

    Specify a callback to run before the start of each flow step.

    Defaults to what Config.getReducerEstimator specifies.

    See also

    ExecutionContext.buildFlow

  63. implicit def strFields[T <: TraversableOnce[String]](f: T): Fields

    Definition Classes
    FieldConversions
  64. implicit def stringToFields(x: String): Fields

    Definition Classes
    FieldConversions
  65. implicit def symbolToFields(x: Symbol): Fields

    '* means Fields.

    '* means Fields.ALL, otherwise we take the .name

    Definition Classes
    FieldConversions
  66. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  67. def timeout[T](timeout: AbsoluteDuration)(t: ⇒ T): Option[T]

  68. implicit def toPipe[T](iter: Iterable[T])(implicit set: TupleSetter[T], conv: TupleConverter[T]): Pipe

  69. def toString(): String

    Definition Classes
    AnyRef → Any
  70. implicit def tuple2ToFieldsPair[T, U](pair: (T, U))(implicit tf: (T) ⇒ Fields, uf: (U) ⇒ Fields): (Fields, Fields)

    Definition Classes
    FieldConversions
  71. implicit def unitToFields(u: Unit): Fields

    Definition Classes
    FieldConversions
  72. def validate(): Unit

  73. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  76. def write(pipe: Pipe, src: Source): Unit

    This is only here for Java jobs which cannot automatically access the implicit Pipe => RichPipe which makes: pipe.

    This is only here for Java jobs which cannot automatically access the implicit Pipe => RichPipe which makes: pipe.write( ) convenient

Inherited from Serializable

Inherited from FieldConversions

Inherited from AnyRef

Inherited from Any

Ungrouped