Skip to content

[Proposal] Support more sinks/sources in scalding-spark #1988

@hazel-sudz

Description

@hazel-sudz

Is your feature request related to a problem? Please describe.
Currently scalding-spark only supports a few scalding sources/sinks. I am interested in adding support for some more common use cases.

The current support is:

  /**
   * This has a mappings for some built in scalding sinks currently only WritableSequenceFile and TextLine are
   * supported
   *
   * users can add their own implementations and compose Resolvers using orElse
   */
  val Default: Resolver[Output, SparkSink] =
    new Resolver[Output, SparkSink] {
      def apply[A](i: Output[A]): Option[SparkSink[A]] =
        i match {
          case ws @ WritableSequenceFile(path, fields, sinkMode) =>
            Some(writableSequenceFile(path, ws.keyType, ws.valueType).asInstanceOf[SparkSink[A]])
          case tl: TextLine =>
            Some(textLine(tl.localPaths.head).asInstanceOf[SparkSink[A]])
          case _ =>
            None
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions