com.twitter.scalding

JsonLine

case class JsonLine(p: String, fields: Fields = cascading.tuple.Fields.ALL, sinkMode: SinkMode = cascading.tap.SinkMode.REPLACE, transformInTest: Boolean = false, failOnEmptyLines: Boolean = true) extends FixedPathSource with TextLineScheme with Product with Serializable

This Source writes out the TupleEntry as a simple JSON object, using the field names as keys and the string representation of the values.

TODO: it would be nice to have a way to add read/write transformations to pipes that doesn't require extending the sources and overriding methods.

failOnEmptyLines

When set to false, it just skips empty lines instead of failing the jobs. Defaults to true for backwards compatibility.

Linear Supertypes
Serializable, Product, Equals, TextLineScheme, SingleMappable[String], Mappable[String], typed.TypedSource[String], TextSourceScheme, FixedPathSource, FileSource, HfsTapProvider, LocalSourceOverride, SchemedSource, Source, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JsonLine
  2. Serializable
  3. Product
  4. Equals
  5. TextLineScheme
  6. SingleMappable
  7. Mappable
  8. TypedSource
  9. TextSourceScheme
  10. FixedPathSource
  11. FileSource
  12. HfsTapProvider
  13. LocalSourceOverride
  14. SchemedSource
  15. Source
  16. Serializable
  17. AnyRef
  18. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new JsonLine(p: String, fields: Fields = cascading.tuple.Fields.ALL, sinkMode: SinkMode = cascading.tap.SinkMode.REPLACE, transformInTest: Boolean = false, failOnEmptyLines: Boolean = true)

    failOnEmptyLines

    When set to false, it just skips empty lines instead of failing the jobs. Defaults to true for backwards compatibility.

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. def andThen[U](fn: (String) ⇒ U): typed.TypedSource[U]

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

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

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

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

    Definition Classes
    SingleMappable → TypedSource
  11. def createHdfsReadTap(hdfsMode: Hdfs): Tap[JobConf, _, _]

    Attributes
    protected
    Definition Classes
    FileSource
  12. def createHfsTap(scheme: Scheme[JobConf, RecordReader[_, _], OutputCollector[_, _], _, _], path: String, sinkMode: SinkMode): Hfs

    Definition Classes
    HfsTapProvider
  13. def createLocalTap(sinkMode: SinkMode): Tap[JobConf, _, _]

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

    Definition Classes
    FileSource → Source
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(that: Any): Boolean

    Definition Classes
    FixedPathSource → AnyRef → Any
  17. val failOnEmptyLines: Boolean

    When set to false, it just skips empty lines instead of failing the jobs.

    When set to false, it just skips empty lines instead of failing the jobs. Defaults to true for backwards compatibility.

  18. val fields: Fields

  19. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  22. def goodHdfsPaths(hdfsMode: Hdfs): Iterable[String]

    Attributes
    protected
    Definition Classes
    FileSource
  23. def hashCode(): Int

    Definition Classes
    FixedPathSource → AnyRef → Any
  24. def hdfsPaths: Iterable[String]

    Definition Classes
    FixedPathSource → FileSource
  25. def hdfsReadPathsAreGood(conf: Configuration): Boolean

    Attributes
    protected
    Definition Classes
    FileSource
  26. def hdfsScheme: Scheme[JobConf, RecordReader[_, _], OutputCollector[_, _], _, _]

    Definition Classes
    TextSourceScheme → SchemedSource
  27. def hdfsWritePath: String

    Definition Classes
    FixedPathSource → FileSource
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def localPaths: Iterable[String]

    Definition Classes
    FixedPathSource → LocalSourceOverride
  30. def localScheme: cascading.scheme.local.TextLine

    Definition Classes
    TextSourceScheme → SchemedSource
  31. def localWritePath: String

    Definition Classes
    LocalSourceOverride
  32. final def mapTo[U](out: Fields)(mf: (String) ⇒ U)(implicit flowDef: FlowDef, mode: Mode, setter: TupleSetter[U]): Pipe

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

    Definition Classes
    AnyRef
  34. final def notify(): Unit

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

    Definition Classes
    AnyRef
  36. val p: String

  37. def pathIsGood(p: String, conf: Configuration): Boolean

    Attributes
    protected
    Definition Classes
    FileSource
  38. def read(implicit flowDef: FlowDef, mode: Mode): Pipe

    Definition Classes
    Source
  39. val sinkMode: SinkMode

    Definition Classes
    JsonLine → SchemedSource
  40. def sourceFields: Fields

    Definition Classes
    TextLineScheme → TypedSource
  41. def sourceId: String

    Definition Classes
    Source
  42. def stripTrailing(path: String): String

    Attributes
    protected
    Definition Classes
    FixedPathSource
  43. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  44. val textEncoding: String

    Definition Classes
    TextSourceScheme
  45. def toIterator(implicit config: Config, mode: Mode): Iterator[String]

    Definition Classes
    Mappable
  46. def toString(): String

    Definition Classes
    JsonLine → FixedPathSource → AnyRef → Any
  47. def transformForRead(pipe: Pipe): Pipe

    Definition Classes
    JsonLine → Source
  48. def transformForWrite(pipe: Pipe): Pipe

    Definition Classes
    JsonLine → Source
  49. val transformInTest: Boolean

    Definition Classes
    JsonLine → Source
  50. def validateTaps(mode: Mode): Unit

    Definition Classes
    FileSource → Source
  51. final def wait(): Unit

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

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

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

    Definition Classes
    Source

Deprecated Value Members

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

    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 TextLineScheme

Inherited from SingleMappable[String]

Inherited from Mappable[String]

Inherited from typed.TypedSource[String]

Inherited from TextSourceScheme

Inherited from FixedPathSource

Inherited from FileSource

Inherited from HfsTapProvider

Inherited from LocalSourceOverride

Inherited from SchemedSource

Inherited from Source

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped