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

Error loading data into Hive #8

Open
sbnagle2 opened this issue Feb 19, 2015 · 2 comments
Open

Error loading data into Hive #8

sbnagle2 opened this issue Feb 19, 2015 · 2 comments

Comments

@sbnagle2
Copy link

I am attempting to load data into hive. I have Elasticsearch running on port 9200, Hive running on 8080. Any attempts at POSTing JSON data to the Hive server give this error - {"error":"unexpected end of JSON input"}. My JSON is valid. I even tried simply loading the example JSON from this repo and received the same error.

I was able to post the data directly to the Elasticsearch port, in index "hive," but I'm not able to utilize any of the Hive API endpoints.

Here's the actual readout from the Hive server:
2015/02/19 10:52:04 Creating index hive
2015/02/19 10:52:04 Done configuring elasticsearch
2015/02/19 10:52:04 Step 2: creating project.
2015/02/19 10:52:04 {"error":"unexpected end of JSON input"}

Here's the JSON I'm trying to POST:
{ "Project":
{ "Id": "idnc", "Name": "IDNC", "Description": "Test loading IDNC image data" },
"Tasks":
[
{ "Name": "categorize", "Description": "categorize images", "CurrentState": "available", "AssignmentCriteria":
{"SubmittedData": { "categorize": {} } }, "CompletionCriteria":
{ "Total": 50, "Matching": 50 } },
{ "Name": "vote", "Description": "vote on image quality (from 1 to 10)", "CurrentState": "waiting", "AssignmentCriteria": { "SubmittedData": { "categorize": { "ad-content": "usable" }, "vote": {} } }, "CompletionCriteria": { "Total": 2, "Matching": 2 } } ], "Assets": [ { "Name": "DIL19720801", "Url": "http://idnc.library.illinois.edu/cgi-bin/imageserver/imageserver.pl?oid=DIL19720801.2.29.2&color=all&ext=jpg&area=2&width=700" }, { "Name": "DIL19661012", "Url": "http://idnc.library.illinois.edu/cgi-bin/imageserver/imageserver.pl?oid=DIL19661012.2.12.2&color=all&ext=jpg&area=7&width=700" }, { "Name": "DIL19640213", "Url": "http://idnc.library.illinois.edu/cgi-bin/imageserver/imageserver.pl?oid=DIL19640213.2.16.1&color=all&ext=jpg&area=11&width=700" }, { "Name": "DIL19691217", "Url": "http://idnc.library.illinois.edu/cgi-bin/imageserver/imageserver.pl?oid=DIL19691217.2.22.2&color=all&ext=jpg&area=1&width=700" } ] }

Any suggestions as to what I'm doing wrong here are welcomed. Thanks!

@inlutero
Copy link

Any update to this?

@reggietheroman
Copy link

reggietheroman commented Apr 21, 2017

Still trying to work out the hive API, but after much trial and error I was able to use the "create project" api like this:

Endpoint: /admin/projects/{project_id}
Request body:
{
"Id": "test",
"Name": "Test,
"Description": "test project"
}

Response body:
{
"Project": {
"Id": "test",
"Name": "Test",
"Description": "test project",
"AssetCount": 0,
"TaskCount": 0,
"UserCount": 0,
"AssignmentCount": null,
"MetaProperties": null
}
}

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

No branches or pull requests

3 participants