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, 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. LocalSourceOverride
  13. SchemedSource
  14. Source
  15. Serializable
  16. AnyRef
  17. 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 createLocalTap(sinkMode: SinkMode): Tap[_, _, _]

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

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

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

    Definition Classes
    FixedPathSource → AnyRef → Any
  16. 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.

  17. val fields: Fields

  18. def finalize(): Unit

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

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

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

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

    Definition Classes
    FixedPathSource → AnyRef → Any
  23. def hdfsPaths: List[String]

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

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

    Definition Classes
    TextSourceScheme → SchemedSource
  26. def hdfsWritePath: String

    Definition Classes
    FileSource
  27. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  28. def localPath: String

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

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

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

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

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

    Definition Classes
    AnyRef
  34. val p: String

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

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

    Definition Classes
    Source
  37. val sinkMode: SinkMode

    Definition Classes
    JsonLine → SchemedSource
  38. def sourceFields: Fields

    Definition Classes
    TextLineScheme → TypedSource
  39. def sourceId: String

    Definition Classes
    Source
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. val textEncoding: String

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

    Definition Classes
    Mappable
  43. def toString(): String

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

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

    Definition Classes
    JsonLine → Source
  46. val transformInTest: Boolean

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. 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 LocalSourceOverride

Inherited from SchemedSource

Inherited from Source

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped