crunch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Wills <>
Subject Re: Crunch integration with ElasticSearch
Date Mon, 08 Apr 2013 05:18:11 GMT
Hey Christian,

Supe-cool. Replies inlined.

On Sun, Apr 7, 2013 at 8:32 PM, Christian Tzolov <
> wrote:

> I've been working on Crunch - ElasticSearch (
> )
>  integration over the weekend :)
> Here is my first prototype:
> and a sample
> application:
> It implements ES Source and Target on top of the ES-Hadoop's (
> ESInputFormat and
> ESOutputFormat.
> Not sure though what is the best/right way to build Source/Targets for new
> Input/Output Formats? Any suggestions, references?

I built a Source for HCatalog last week as part of ML:

The interesting bit is really in the configureSource method: if the inputId
is < 0, then it's a single-input MapReduce job, and you can essentially
configure the input just as you would for a regular MapReduce. If the
inputId >= 0, then it's a multi-input job (e.g., for a join), and you have
to use CrunchInputs w/a FormatBundle object. The FormatBundle wraps an
InputFormat or an OutputFormat w/any Configuration settings that the
InputFormat/OutputFormat needs. This way, you can have multiple inputs that
use the same InputFormat, but have different configuration settings (e.g.,
when you're joining multiple Avro files together and they each need to have
their own schema specified.)

> The write to ES is tricky and at the moment looks more like a hack (see the
> doc).
> Cheers
> Chris
> (P.S The prototype doesn't support AvroTypeFamily yet but I've been looking
> at jackson-dataformat-avro kind of solution (ES-Hadoop relies on Jackson
> for the JSON serialisation)

I'd like to work on this as well-- I'll take a look tomorrow and try to put
together a pull req for anything that I think should be configured


Director of Data Science
Cloudera <>
Twitter: @josh_wills <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message