Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update HTTPClient to HTTPComponents #7

Closed
Downchuck opened this issue Mar 19, 2013 · 7 comments
Closed

Update HTTPClient to HTTPComponents #7

Downchuck opened this issue Mar 19, 2013 · 7 comments

Comments

@Downchuck
Copy link

The 3.1 interface has long since been abandoned to the new http components interface. The gradle script already downloads the appropriate jar files, it's simply a matter of using the newer API.

@costin
Copy link
Member

costin commented Mar 19, 2013

See issue #6 - the Hadoop integration relies on the dependencies form Hadoop instead of ElasticSearch - the reason? when you deploy against Hadoop, you have a small, stand-alone jar that you can use.

@costin costin closed this as completed Mar 19, 2013
@Downchuck
Copy link
Author

Seems ideal, but that's only going to work with particular versions/builds of Hadoop it seems. Perhaps we ought to have a branch that simply includes the current elasticsearch version; which provides for both client modes (joining a node and remote http posts) and json serialization. It does seem like the object mapper should not be an absolute requirement in the API, given that the object may already be a valid json string.

@costin
Copy link
Member

costin commented Mar 23, 2013

Currently it's going to work with the entire 1.x version which is the only one marked as stable. For Hadoop 2.x will revise it but so far it looks okay since the existing code works with the updated libraries.
Not sure why you mention elasticsearch - there's no code dependency on it (see the comment above). As for the object mapper, that's an internal implementation that might go away.
Not sure what you're referring to as an API but the Hive/Pig/InputOutput format do not expose that.

@Downchuck
Copy link
Author

I had to do a few tweaks for Hadoop 0.20x. It's working, there were some tweaks, for whatever reason shutdown wasn't working.

@costin
Copy link
Member

costin commented Mar 23, 2013

I'd be interested in knowing what the tweaks were. Any reason why you're using Hadoop 0.20.x and not 1.x?

@tzolov
Copy link

tzolov commented Apr 5, 2013

Currently elasticsearch-hadoop uses httpclient 3.1 while hadoop 1.x depends on 3.0.1 (https://svn.apache.org/repos/asf/hadoop/common/tags/release-1.0.4/ivy/libraries.properties).
This leads to NoSuchMethod exceptions as the 'shutdown()' method is only available in 3.1.
Hadoop 2.x though uses httpclient 3.1

costin added a commit that referenced this issue Apr 5, 2013
force httpclient 3.0.1 to be used (was upgraded to 3.1 because of
Hadoop dependencies)
fixed #7
@costin
Copy link
Member

costin commented Apr 5, 2013

@tzolov thanks for the heads-up. httpclient 3.1 is used since Hadoop 1.0.4 transitive dependencies rely on httpclient 3.1 while Hadoop only requires 3.0.1. I'm not sure why ivy doesn't catch that or at least why 3.1 doesn't actually shows up in the Hadoop distro, nevertheless I've fixed the build file to force the use of 3.0.1 and fixed the use of shutdown method.
Long term depending on performance testing, MultiThreadedHttpConnectionManager might be used instead of SimpleHttpConnectionManager and that has a proper shutdown method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants