Read elasticsearch with Cascading

Hello guys,

I would like export elasticsearch to json via Cascading (or any hadoop tools, but I try cascading right now).

    Properties props = new Properties();
    props.setProperty("es.nodes.wan.only", "true");
    props.setProperty("es.output.json", "true");

    Tap events = new EsTap("", 9200, "test/test", "?q=*");


Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at org.elasticsearch.hadoop.cascading.EsLocalScheme.source(
at cascading.tuple.TupleEntrySchemeIterator.getNext(
at cascading.tuple.TupleEntrySchemeIterator.hasNext(
... 7 more

Which seems normal because:

This looks like a similar issue to the one you posted about Pig. After taking a quick look at the code, I think it's also definitely a bug. I've opened an issue here.

With this showing up twice now, I'm also planning on doing a comprehensive review of the es.output.json feature. It seems to be a feature that is lacking in it's tests.