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
Pig storage constructors only take strings #34
Comments
Note, the same change needs to be made to ESLoader :-) |
Where does this 'requirement' come from? We test again Pig (0.10.1) in local mode in our suite and it runs fine. Can you tell me how to reproduce the problem? Thanks! |
The root of the problem is when the elasticsearch server does not reside on localhost, so that you have to define the server and the port to connect to using the custom constructor. This pig code generates a pig syntax error when run because of the 9200 port number being numeric.
If I change the 9200 to a string ('9200'), then the syntax error goes away, but the constructor cannot be resolved (because there is no (String, String) constructor. In order to make it work, I patched the ESStorage custom constructor to change it to take a string instead of an integer for the port number. |
Found the problem - the tests were using the default constructor which called the non-string constructor internally, outside Pig. |
ESStorage has a constructor ESStorage(String, int) that is intended to set the host and port for the storage. Pig requires that the constructor only take strings. I changed my local code as follows:
The text was updated successfully, but these errors were encountered: