HI Jeremy,

The timestamp type is not supported yet. Please just use INT.

Zheng

On Sun, Jan 11, 2009 at 8:36 PM, Jeremy Chow <coderp...@gmail.com> wrote:

> Hey zheng,
>
> I know that command you refered. My meaning is that an interface which our
> programs can invoke it ,  not just a command.
> BTW, another questions about this command,  I  want to create a table for
> loading data from a plain file in the next step, following the tutorial on
> http://wiki.apache.org/hadoop/Hive/UserGuide.  But it failed, throwing a
> exception liked below,
> hive> CREATE TABLE u_data (userid INT, movieid INT, rating INT, unixtime
> TIMESTAMP) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS
> TEXTFILE;
> ERROR: DDL specifying type timestamp which has not been defined
> java.lang.RuntimeException: specifying type timestamp which has not been
> defined
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.FieldType(thrift_grammar.java:1879)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Field(thrift_grammar.java:1545)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.FieldList(thrift_grammar.java:1501)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Struct(thrift_grammar.java:1171)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.TypeDefinition(thrift_grammar.java:497)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Definition(thrift_grammar.java:439)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.thrift_grammar.Start(thrift_grammar.java:101)
>         at
> org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe.initialize(DynamicSerDe.java:97)
>         at
> org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:180)
>         at
> org.apache.hadoop.hive.ql.metadata.Table.initSerDe(Table.java:141)
>         at
> org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:199)
>         at
> org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:598)
>         at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:93)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:212)
>         at
> org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:174)
>         at
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:207)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:305)
>         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)
>
> FAILED: Error in metadata:
> MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
> java.lang.RuntimeException: specifying type timestamp which has not been
> defined)
> FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.DDLTask
> Time taken: 2.462 seconds
>
> How can I fix it?
>
> On Mon, Jan 12, 2009 at 11:52 AM, Zheng Shao <zsh...@gmail.com> wrote:
>
>> Hi Jeremy,
>>
>> Yes! There is a command called "LOAD DATA INPATH" which loads (actually
>> moves) files from HDFS, and "LOAD DATA LOCAL INPATH" which loads files from
>> local file system.
>> Please take a look at the README file in hive code for the full examples.
>>
>>
>> Zheng
>>
>>
>> On Sun, Jan 11, 2009 at 7:43 PM, Jeremy Chow <coderp...@gmail.com> wrote:
>>
>>> Hi list,
>>>    Is there any interface in hive to let us load a table from a flat text
>>> file? and Is it a parallel process?
>>>    Can anyone give me some explanation about above?
>>>
>>>
>>> Thanks,
>>> Jeremy
>>> --
>>> My research interests are distributed systems, parallel computing and
>>> bytecode based virtual machine.
>>>
>>> http://coderplay.javaeye.com
>>>
>>
>>
>>
>> --
>> Yours,
>> Zheng
>>
>
>
>
> --
> My research interests are distributed systems, parallel computing and
> bytecode based virtual machine.
>
> http://coderplay.javaeye.com
>



-- 
Yours,
Zheng

Reply via email to