Hi there,
I'm running elasticsearch "stable 2.1.1, HEAD". When running ./bin/elasticsearch
, everything's fine until I try to to connect to it. Using the stream "someindex/ledger" and key "somekey", I get the below server and client errors. I'm using Samza's TransportClientFactory, that I expect creates a client that connects to an ES cluster.
Elasticsearch gives me this error:
http://pastebin.com/Ucnsc9Rj
And my client gives me this error:
http://pastebin.com/7x9zWB0T
My elasticsearch.yml
file has the below configs. Is there something else I'm missing?
node.name: node-1
bootstrap.mlockall: true
network.host: 127.0.0.1
It looks like Samza is using an old version (1.5.1) of the Elasticsearch TransportClient: https://github.com/apache/samza/blob/master/gradle/dependency-versions.gradle#L20
The binary protocol that the TransportClient uses is only backwards compatible within minor versions. So 1.5.1 can only talk to 1.x, not 2.x. That's probably why the client can connect to the cluster, but then throws an exception because the two are not serializing/deserializing each other's communication correctly.
Caveat: I've never used Samza and have no familiarity with the code/project
That seems to have done the trick. Cheers But now I get these Malformed content
errors, when writing message "{\"foo\" : 1}"
to :stream "someindex/ledger" with key "somekey".
ES:
org.elasticsearch.index.mapper.MapperParsingException: Malformed content, must start with an object
Client:
13:42:54.235 [ThreadJob] ERROR o.a.s.s.e.ElasticsearchSystemProducer - Failed to index document in Elasticsearch: MapperParsingException[Malformed content, must start with an object]
I have a feeling Samza's producer is writing out the payload incorrectly. Any ideas where I should be looking?
Thanks
Ok, sorted this one out. The ES producer doesn't seem to require a serde. Looks like you can just pass in a java map.