Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Scala API for Cascading
Scala Ruby Java Shell

Merge pull request #1333 from sid-kap/scalding_default_4GB_per_reducer

Change defaults for Scalding reducer estimator
latest commit a3d9672bb0
@rubanm rubanm authored
Failed to load latest commit information.
logo Add scalding logo
maple/src/main/java/com remove unused imports from maple java code
project Bump to scala 2.11
scalding-args/src Override hashCode for Args
scalding-avro Move Scalding to 2.10/2.11
scalding-benchmarks/src/test/scala/com/twitter/scalding import hygiene: remove unused imports
scalding-commons Merge pull request #1314 from twitter/jnievelt/versioned-key-val-sour…
scalding-core Merge branch 'develop' into scalding_default_4GB_per_reducer
scalding-date/src Fix SimpleDateFormat caching by default
scalding-hadoop-test/src Conflicts:
scalding-hraven only request necessary hadoop configs in hraven reducer estimator
scalding-jdbc/src Fixes
scalding-json/src import hygiene: remove unused imports
scalding-macros/src Move OrderedSerialization into zero-dep scalding-serialization module
scalding-parquet-scrooge Add parquet-scrooge sources
scalding-parquet Improve TypedParquetTuple #1302
scalding-repl Changed scope for useHdfsLocalMode to private
scalding-serialization-macros/src Merge pull request #1316 from MansurAshraf/mashraf/sketch
scalding-serialization/src Merge pull request #1332 from twitter/oscar/supress-warn
scripts Add testing readme
tutorial bumping version to 0.15.0; algebird to 0.10.1
.gitignore Conflicts:
.travis.blacklist Adds a test validator to ensure all tests running
.travis.yml Bump to scala 2.11
CHANGES.md bumping version to 0.15.0; algebird to 0.10.1
CONTRIBUTING.md Add CONTRIBUTING.md
LICENSE Initial Import
NOTICE Initial Import
README.md bumping version to 0.15.0; algebird to 0.10.1
sbt upgrade to latest sbt launcher script
version.sbt Conflicts:

README.md

Scalding

Scalding is a Scala library that makes it easy to specify Hadoop MapReduce jobs. Scalding is built on top of Cascading, a Java library that abstracts away low-level Hadoop details. Scalding is comparable to Pig, but offers tight integration with Scala, bringing advantages of Scala to your MapReduce jobs.

Scalding Logo

Current version: 0.15.0

Word Count

Hadoop is a distributed system for counting words. Here is how it's done in Scalding.

package com.twitter.scalding.examples

import com.twitter.scalding._

class WordCountJob(args: Args) extends Job(args) {
  TypedPipe.from(TextLine(args("input")))
    .flatMap { line => tokenize(line) }
    .groupBy { word => word } // use each word for a key
    .size // in each group, get the size
    .write(TypedTsv[(String, Long)](args("output")))

  // Split a piece of text into individual words.
  def tokenize(text : String) : Array[String] = {
    // Lowercase each word and remove punctuation.
    text.toLowerCase.replaceAll("[^a-zA-Z0-9\\s]", "").split("\\s+")
  }
}

Notice that the tokenize function, which is standard Scala, integrates naturally with the rest of the MapReduce job. This is a very powerful feature of Scalding. (Compare it to the use of UDFs in Pig.)

You can find more example code under examples/. If you're interested in comparing Scalding to other languages, see our Rosetta Code page, which has several MapReduce tasks in Scalding and other frameworks (e.g., Pig and Hadoop Streaming).

Documentation and Getting Started

Please feel free to use the beautiful Scalding logo artwork anywhere.

Code of Conduct

This, and all github.com/twitter projects, are under the Twitter Open Source Code of Conduct. Additionally, see the Typelevel Code of Conduct for specific examples of harassing behavior that are not tolerated.

Building

There is a script (called sbt) in the root that loads the correct sbt version to build:

  1. ./sbt update (takes 2 minutes or more)
  2. ./sbt test
  3. ./sbt assembly (needed to make the jar used by the scald.rb script)

The test suite takes a while to run. When you're in sbt, here's a shortcut to run just one test:

> test-only com.twitter.scalding.FileSourceTest

Please refer to FAQ page if you encounter problems when using sbt.

We use Travis CI to verify the build: Build Status

We use Coveralls for code coverage results: Coverage Status

Scalding modules are available from maven central.

The current groupid and version for all modules is, respectively, "com.twitter" and 0.12.0.

Current published artifacts are

  • scalding-core_2.10
  • scalding-args_2.10
  • scalding-date_2.10
  • scalding-commons_2.10
  • scalding-avro_2.10
  • scalding-parquet_2.10
  • scalding-repl_2.10

The suffix denotes the scala version.

Adopters

  • Ebay
  • Etsy
  • Sharethrough
  • Snowplow Analytics
  • Soundcloud
  • Twitter

To see a full list of users or to add yourself, see the wiki

Contact

For user questions, we are using the cascading-user mailing list for discussions: http://groups.google.com/group/cascading-user

For scalding development (internals, extending, release planning): https://groups.google.com/forum/#!forum/scalding-dev

In the remote possibility that there exist bugs in this code, please report them to: https://github.com/twitter/scalding/issues

Follow @Scalding on Twitter for updates.

Chat (IRC): freenode channel: #scalding

Authors:

Thanks for assistance and contributions:

A full list of contributors can be found on GitHub.

License

Copyright 2013 Twitter, Inc.

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Something went wrong with that request. Please try again.