hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Hains <aha...@gmail.com>
Subject Unable to set hive.fetch.output.serde via hive2 jdbc
Date Fri, 04 Apr 2014 17:26:46 GMT
Background:
I have some somewhat deeply nested types in a hive table that are causing
queries to error out when executing through JDBC. The same queries are
successful via the CLI and via hue beeswax clients. The JDBC error states

Number of levels of nesting supported for LazySimpleSerde is 7 Unable to
work with level 8. Use hive.serialization.extend.nesting.levels serde
property for tables using LazySimpleSerde.
at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:159)

I am therefore attempting to change my hive client configs to use a
different SerDe. What I am finding is that although I can generally set
hive config values, I am unable to modify the value of
hive.fetch.output.serde. My set statement for this is ignored.

Statement stmt = con.createStatement();
stmt.execute("set foo.bar=baz1");
stmt.execute("set
hive.fetch.output.serde=org.apache.hadoop.hive.serde2.DelimitedJSONSerDe");

ResultSet res = stmt.executeQuery("set -v");
while (res.next())
{
System.out.println(res.getString(1));
}


The results from 'set -v' show my value for foo.bar, but
hive.fetch.output.serde still shows
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.

Alternatively, I have tried
setting hive.serialization.extend.nesting.levels=true as the error
suggests. This config does show the new value in the 'set -v' results, but
for some reason does not resolve the nesting error when executing my query.
FWIW, I also tried setting these values via the jdbc url, but to no avail.

Any tips on a direction I can look in to work past this?
thanks!
-Adrian

Mime
View raw message