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

JSON SerDe on SparkSQL throws ClassCastException #97

Closed
randallwhitman opened this issue Mar 9, 2016 · 1 comment
Closed

JSON SerDe on SparkSQL throws ClassCastException #97

randallwhitman opened this issue Mar 9, 2016 · 1 comment
Milestone

Comments

@randallwhitman
Copy link
Contributor

java.lang.ClassCastException: java.lang.Long cannot be cast to org.apache.hadoop.io.Writable

Seen in SparkSQL shell; had not been seen when testing on Hive.
Both with v1.1 and master.

@randallwhitman
Copy link
Contributor Author

For integration-regression testing, I ran the following queries updated from #25:

create external table trips_by_origin_cell(leftlon double, botlat double, rightlon double, toplat double, totnum int, samedest int, pct double, destlhs double, destbot double, destrhs double, desttop double)
row format delimited fields terminated by '\t'
location '/user/rwhitman/out-trips-by-origin-cell';

create external table trip_origin_json  (totnum int, samedest int, pct double, destlhs double, destbot double, destrhs double, desttop double, shape binary)
row format serde 'com.esri.hadoop.hive.serde.EsriJsonSerDe'
stored as inputformat 'com.esri.json.hadoop.UnenclosedEsriJsonInputFormat'
outputformat 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
;
insert overwrite table trip_origin_json select totnum, samedest, pct, destlhs, destbot, destrhs, desttop,
  ST_Polygon(leftlon,botlat, rightlon,botlat, rightlon,toplat, leftlon,toplat) from trips_by_origin_cell;

create external table trip_origin_geojs  (totnum int, samedest int, pct double, destlhs double, destbot double, destrhs double, desttop double, shape binary)
row format serde 'com.esri.hadoop.hive.serde.GeoJsonSerDe'
stored as inputformat 'com.esri.json.hadoop.UnenclosedGeoJsonInputFormat'
outputformat 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
;
insert overwrite table trip_origin_geojs select totnum, samedest, pct, destlhs, destbot, destrhs, desttop,
  ST_Polygon(leftlon,botlat, rightlon,botlat, rightlon,toplat, leftlon,toplat) from trips_by_origin_cell;

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

1 participant