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 while querying integer fields in hive for data transfered using hadoop tool box #43

Closed
vittal1hbbr opened this issue Apr 22, 2016 · 6 comments
Labels

Comments

@vittal1hbbr
Copy link

I have created table in hive for the data transferred using gis toolbox and i get error in hive as shown below for int data types.

hive> describe bhuj2;
OK
bldgsubroad string from deserializer
sublocality string from deserializer
cityname string from deserializer
statename string from deserializer
bldgsize string from deserializer
tag string from deserializer
pincode int from deserializer
numberofflats int from deserializer
numberofshops int from deserializer
bldg_type string from deserializer
cableoperatorname string from deserializer
Time taken: 0.061 seconds, Fetched: 11 row(s)
hive> select pincode,numberofflats from bhuj2 limit 10;
OK
org.codehaus.jackson.JsonParseException: Current token (VALUE_NULL) not numeric, can not use numeric value accessors
at [Source: java.io.StringReader@7da96006; line: 1, column: 325]
at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1432)
at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
at org.codehaus.jackson.impl.JsonParserBase._parseNumericValue(JsonParserBase.java:763)
at org.codehaus.jackson.impl.JsonParserBase.getIntValue(JsonParserBase.java:618)
at com.esri.hadoop.hive.serde.JsonSerde.setRowFieldFromParser(Unknown Source)
at com.esri.hadoop.hive.serde.JsonSerde.deserialize(Unknown Source)
at org.apache.hadoop.hive.ql.exec.FetchOperator.getNextRow(FetchOperator.java:647)
at org.apache.hadoop.hive.ql.exec.FetchOperator.pushRow(FetchOperator.java:561)
at org.apache.hadoop.hive.ql.exec.FetchTask.fetch(FetchTask.java:138)
at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:1621)
at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:267)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:199)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:410)
at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:783)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
370427 0
370427 0
370427 0
370427 0
370427 0
370001 0
370001 0
370001 0
370427 0
370427 0

@randallwhitman
Copy link
Contributor

@vittal1hbbr
Copy link
Author

        I have not used java or any other programming platform  to build the spatial framework nor the ant or maven to build jars, we have added spatial framework jars   and St_Geometry functions in hive for spatial functioning. Should that work.   

@randallwhitman
Copy link
Contributor

randallwhitman commented May 16, 2016

Once release 1.2 is built, that should contain the change which I expect to fix this, so that should work.
Cross-reference Esri/geometry-api-java#115

@vittal1hbbr
Copy link
Author

thank u for u time and support
we are currently working on geometry processing in hive ,and we have few issues where hive fails to handle the curve rings and throws back error as shown below :

hive> select count(*) from r4g_appdev_progressmonitoring_plannedroute;
Query ID =3D hadoop_20160516115050_1af22a4b-db5b-4910-9354-e907f79638e6
Total jobs =3D 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1 In order to change the average load for a reducer (in bytes):

Diagnostic Messages for this Task:
Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveE=
xception: Hive Runtime Error while processing writable {"attributes": {"FAC=
ILITY_SAP_ID": null, "LINK_ID_1X1G": null, "WIDTH": null, "CREATED_DATE": n= ull, "ROUTEPATH_NEW": "AG1-AG2 Path", "SPAN_ID_1X10G": null,"LINK_STATUS":= null, "SCOPE_CATEGORY": "Intracity Priority Scope", "JIOCENTERNAME": null,=
"LEASE_ROUTE_LINK_ID": " ", "FINAL_CORE":facilityid geometry": {"curvePath= s":[[[909237.22192069143,2925965.7623463236],[909236.80957762152,2925920.26=
23053901],[909298.08011118323,2925923.7148636989],[909441.57417548448,29259=
21.2895978503],[909495.04339818656,2925913. spatialReference":{"wkt":"PROJC= S["Reliance_LCC",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["=
WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degre=
e",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],

  I suppose that above  are related to  geometry api jar and spatial sdk jar.
       Let us know if any  fixes available for above  issue ,or any suggestions where we can code as per  our requirement .     

@randallwhitman
Copy link
Contributor

randallwhitman commented May 17, 2016

There is already #47 for curves - let's stick to one issue per issue.

@randallwhitman
Copy link
Contributor

Please try out the null handling in v1.2.0

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

No branches or pull requests

2 participants