Hi Ted, It looks like your copy of Hive does not have the changes that implemented support for integration with HBase. HBase support was committed to trunk on March 12th, and currently it is only available on trunk. In order to use it you need to checkout (or update) the source from the svn repository. Instructions describing how to do this are on the Hive wiki.
Carl On Thu, Mar 25, 2010 at 9:29 AM, Ted Yu <[email protected]> wrote: > Hi, > I encountered Parse Error creating table in CLI: > > [r...@tyu-linux hive-0.5.0-bin]# bin/hive > Hive history file=/tmp/root/hive_job_log_root_201003240832_1752130264.txt > hive> SHOW TABLES; > OK > Time taken: 8.09 seconds > hive> CREATE EXTERNAL TABLE users(key string, state string, country string, > country_id int) > > STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' > > > > WITH SERDEPROPERTIES ( > > > > "hbase.key.type" = "string", > > > > "hbase.columns.mapping" = "info:state,info:country,info:country_id", > > > > "hbase.table.name" = "users" > > > > ); > FAILED: Parse Error: line 2:0 cannot recognize input 'STORED' in table file > format specification > > *Here is the tail of hive.log:* > 2010-03-24 08:32:07,937 ERROR DataNucleus.Plugin > (Log4JLogger.java:error(115)) - Bundle "org.eclipse.jdt.core" requires > "org.eclipse.text" but it cannot be resolved. > 2010-03-24 08:34:18,337 ERROR ql.Driver (SessionState.java:printError(248)) > - FAILED: Parse Error: line 2:0 cannot recognize input 'STORED' in table > file format specification > > org.apache.hadoop.hive.ql.parse.ParseException: line 2:0 cannot recognize > input 'STORED' in table file format specification > > at > org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:357) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:267) > at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312) > at > org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123) > at > org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287) > 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:156) > > If you know how to fix my query, please share. >
