Member since
07-12-2018
5
Posts
0
Kudos Received
0
Solutions
07-17-2018
05:44 PM
Hey @Vinicius Higa Murakami You seem very knowledgeable and I was wondering if you knew when Hive would reference the schema that I specified. For example, if I version-out that schema and replace it with a new schema in the same location with the same name, when will my External Hive table pick up on that schema? My main question is the behavior of Hive and to understand when that schema is referenced by the Hive table. As always, I appreciate your help.
... View more
07-15-2018
10:06 PM
Hi @Vinicius Higa Murakami Thank you for being so willing to help. I appreciate it! I ended up doing the same thing you did and tracing the error (which I assumed was the IO versus URISyntax) on the Hive GitHub repo and tracked that to the Apache Hadoop docs. I got to this point in my trace and realized that my Hive server was running on a different server [than my edge node].
Once I dropped the file on that server, it worked like a charm.
Thanks again for your help!
... View more
07-12-2018
09:58 PM
Hi @Vinicius Higa Murakami And yes, it does work if I throw it in HDFS. Just not using 'file:///' {
"namespace": "com.linkedin.haivvreo",
"name": "test_serializer",
"type": "record",
"fields": [
{ "name":"string1", "type":"string" },
{ "name":"int1", "type":"int" },
{ "name":"tinyint1", "type":"int" },
{ "name":"smallint1", "type":"int" },
{ "name":"bigint1", "type":"long" },
{ "name":"boolean1", "type":"boolean" },
{ "name":"float1", "type":"float" },
{ "name":"double1", "type":"double" },
{ "name":"list1", "type":{"type":"array", "items":"string"} },
{ "name":"map1", "type":{"type":"map", "values":"int"} },
{ "name":"struct1", "type":{"type":"record", "name":"struct1_name", "fields": [
{ "name":"sInt", "type":"int" }, { "name":"sBoolean", "type":"boolean" }, { "name":"sString", "type":"string" } ] } },
{ "name":"union1", "type":["float", "boolean", "string"] },
{ "name":"enum1", "type":{"type":"enum", "name":"enum1_values", "symbols":["BLUE","RED", "GREEN"]} },
{ "name":"nullableint", "type":["int", "null"] },
{ "name":"bytes1", "type":"bytes" },
{ "name":"fixed1", "type":{"type":"fixed", "name":"threebytes", "size":3} }
] }<br> This was an example taken from the Hive docs
... View more
07-12-2018
09:38 PM
Thanks @Vinicius Higa Murakami for the prompt answer! I did try to use TBLPROPERTIES ( 'avro.schema.url'='file:///<filepath>') and got the following error: Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException Encountered AvroSerdeException determining schema. Returning signal schema to indicate problem: Unable to read schema from given path: file:///<filepath>.avsc) (state=08S01,code=1) I also tried WITH SERDEPROPERTIES ( 'avro.schema.url'='file:///<filepath>.avsc') and got the same error as above. I am under the assumption it may be a configuration issue. Any ideas?
... View more
07-12-2018
08:55 PM
I am trying to create an external Hive table that points to an avro schema file (.avsc) that lives on the local file system. I know this is possible on Cloudera, but not so sure about Hortonworks. Typically, most 'avro.schema.url' examples point to 'hdfs:///', but this is not what I am hoping to accomplish. I am attempting to use 'file:///'. The functionality I am attempting to mimic can be found here. Any help would be greatly appreciated!
... View more
Labels:
- Labels:
-
Apache Hive