I received this error when I did not have a trailing space at the end
of my lines. The parser needs to be a little more robust in this area,
I think there is an issue up for this already.
Josh Ferguson
On Dec 4, 2008, at 1:59 PM, Bill Au wrote:
I am new to Hive. I am using Hadoop 0.19.0 and am running the
version of Hive packaged with it under contrib/hive. I am following
the apache access log example in the Hive user guide Wiki:
http://wiki.apache.org/hadoop/Hive/UserGuide
I cut and pasted the create table statement from the Wiki but it is
giving me an error:
$ bin/hive
hive> CREATE TABLE apachelog (
> ipaddress STRING, identd STRING, user STRING,finishtime STRING,
> requestline string, returncode INT, size INT)
> ROW FORMAT SERDE
'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe'
> WITH SERDEPROPERTIES (
>
'serialization
.format'='org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol',
> 'quote.delim'='("|\\[|\\])',
> 'field.delim'=' ',
> 'serialization.null.format'='-')
> STORED AS TEXTFILE;
FAILED: Parse Error: line 1:132 cannot recognize input 'ROW'
java.lang.NullPointerException
at org.apache.hadoop.hive.ql.Driver.getResults(Driver.java:
221)
at
org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:112)
at
org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:137)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:
234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect
.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun
.reflect
.DelegatingMethodAccessorImpl
.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
$
What did I miss? Or is this example valid?
Bill