<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: IllegalArgumentException in Create Table Hive with SerDe in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127275#M89994</link>
    <description>&lt;P&gt;have you added following property in TBLPROPERTIES&lt;/P&gt;&lt;PRE&gt;"hbase.struct.autogenerate"= "true"&lt;/PRE&gt;&lt;P&gt;This allows you to avoid manually creating the columns and types for Avro schemas&lt;/P&gt;&lt;P&gt;And ,I think hive.serialization.extend.nesting.levels may not be in affect as it is used by lazySimpleSerde&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2016 18:25:38 GMT</pubDate>
    <dc:creator>asinghal</dc:creator>
    <dc:date>2016-07-14T18:25:38Z</dc:date>
    <item>
      <title>IllegalArgumentException in Create Table Hive with SerDe</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127274#M89993</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am trying to integrate Hive with an HBase instance that uses Avro to store data. I have followed the procedure described in the &lt;A href="https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration#HBaseIntegration-AvroDataStoredinHBaseColumns.1"&gt;documentation here&lt;/A&gt;. In HBase I have one table called 'events' with one column family (masterdata) and one payload column (payload). &lt;/P&gt;&lt;P&gt;The stack is running on Hortonworks 2.4: &lt;/P&gt;&lt;P&gt;Hive: 1.2.1, &lt;/P&gt;&lt;P&gt;Hbase: 1.1.2&lt;/P&gt;&lt;P&gt;HDFS: 2.7.1&lt;/P&gt;&lt;P&gt;The procedure to create the table in Hive is stored as setup.hql:&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE masterdata_events
ROW FORMAT SERDE 'org.apache.hadoop.hive.hbase.HBaseSerDe'
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES (
  "hbase.columns.mapping" = ":key,masterdata:payload",
  "masterdata.payload.serialization.type"="avro",
  "masterdata.payload.avro.schema.url" = 'hdfs://cluster/schema.avsc',
  "hive.serialization.extend.nesting.levels" = "true"
)
TBLPROPERTIES ("hbase.table.name" = "events", "hbase.struct.autogenerate"="true");&lt;/PRE&gt;&lt;P&gt;I run it with 'hive -f setup.hql'. The output is as follows:&lt;/P&gt;&lt;PRE&gt;OK
Time taken: 2.625 seconds
OK
Time taken: 3.301 seconds
OK
Time taken: 0.066 seconds
FAILED: IllegalArgumentException Error: : expected at the end of 'string:struct&amp;lt;product:struct&amp;lt;productmain:struct&amp;lt;id:string,...so on and so on ...&amp;gt;'
&lt;/PRE&gt;&lt;P&gt;Now, I would like to point out that the amount of characters between the two single quotes is 4008. After a search on google, I have found &lt;A href="https://community.hortonworks.com/questions/33311/number-column-limitations-in-hive-over-hbase-table.html"&gt;an answer&lt;/A&gt; from another user in this community stating that you have to increase the size of the SERDE_PARAMS in the Hive Metadata store. Now, despite the workaround, I am still experiencing the same issue. I have also tried to use "masterdata.payload.avro.schema.literal" as well, but nothing has changed. The avro schema is valid json (verified).&lt;/P&gt;&lt;P&gt;Could you please give me any hints? &lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 21:38:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127274#M89993</guid>
      <dc:creator>marcusbu</dc:creator>
      <dc:date>2016-07-13T21:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: IllegalArgumentException in Create Table Hive with SerDe</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127275#M89994</link>
      <description>&lt;P&gt;have you added following property in TBLPROPERTIES&lt;/P&gt;&lt;PRE&gt;"hbase.struct.autogenerate"= "true"&lt;/PRE&gt;&lt;P&gt;This allows you to avoid manually creating the columns and types for Avro schemas&lt;/P&gt;&lt;P&gt;And ,I think hive.serialization.extend.nesting.levels may not be in affect as it is used by lazySimpleSerde&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 18:25:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127275#M89994</guid>
      <dc:creator>asinghal</dc:creator>
      <dc:date>2016-07-14T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: IllegalArgumentException in Create Table Hive with SerDe</title>
      <link>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127276#M89995</link>
      <description>&lt;P&gt;Thanks a lot for your answer, &lt;A rel="user" href="https://community.cloudera.com/users/627/asinghal.html" nodeid="627"&gt;@Ankit Singhal&lt;/A&gt;! Yes, I have added the property&lt;/P&gt;&lt;PRE&gt;"hbase.struct.autogenerate" = "true"&lt;/PRE&gt;&lt;P&gt;in the setup.hql file. In regards to the "hive.serialization.extend.nesting.levels", I had to add it, because I was receiving an error message like this:&lt;/P&gt;&lt;PRE&gt;ERROR ql.Driver: FAILED: SemanticException 
org.apache.hadoop.hive.serde2.SerDeException: Number of levels of 
nesting supported for LazySimpleSerde is 8 Unable to work with 9 levels&lt;/PRE&gt;&lt;P&gt;or something similar. After I added that line, it started working just to break to IllegalArgumentException - I am not sure if they are somehow related (?).&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2016 20:57:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/IllegalArgumentException-in-Create-Table-Hive-with-SerDe/m-p/127276#M89995</guid>
      <dc:creator>marcusbu</dc:creator>
      <dc:date>2016-07-14T20:57:02Z</dc:date>
    </item>
  </channel>
</rss>

