You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Павел Мезенцев <pa...@mezentsev.org> on 2012/06/03 08:53:53 UTC

FileNotFoundException

Hello all!

I tried to create simple table in hive
> create table test (a string);

But its failed:
FAILED: Error in metadata: MetaException(message:Got exception:
java.io.FileNotFoundException File file:/user/hive/warehouse/test does not
exist.)
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask

I set up hadoop and hive locally from couderra distribution CDH3 on Ubuntu
12.04.
And use default settings.

What I do wrong?  How can I fix it?

Thank you!
Best regards
Mezentsev Pavel
Russia

Re: FileNotFoundException

Posted by Nitin Pawar <ni...@gmail.com>.
try setting up location in create table statement and provide valid hdfs
path

On Sun, Jun 3, 2012 at 12:23 PM, Павел Мезенцев <pa...@mezentsev.org> wrote:

> Hello all!
>
> I tried to create simple table in hive
> > create table test (a string);
>
> But its failed:
> FAILED: Error in metadata: MetaException(message:Got exception:
> java.io.FileNotFoundException File file:/user/hive/warehouse/test does not
> exist.)
> FAILED: Execution Error, return code 1 from
> org.apache.hadoop.hive.ql.exec.DDLTask
>
> I set up hadoop and hive locally from couderra distribution CDH3 on Ubuntu
> 12.04.
> And use default settings.
>
> What I do wrong?  How can I fix it?
>
> Thank you!
> Best regards
> Mezentsev Pavel
> Russia
>



-- 
Nitin Pawar

Re: FileNotFoundException

Posted by Bejoy Ks <be...@yahoo.com>.
Hi Pavel
    
The issue is some how your hive client is pointing to lfs rather than hdfs. There could be two possible reasons for this, first one amd the most likeliest one is  that your hdfs 'fs.default.name' points to file:/// instead of hdfs:// . In default the value of this property is 'file:///' you need to override this property  in core-site.xml.

Second possibility is less likely, it can happen if you have overridden the value of hive.metastore.warehouse.dir in your hive-site.xml and the value is prefixed with 'file:///'

Regards
Bejoy KS


________________________________
 From: "kulkarni.swarnim@gmail.com" <ku...@gmail.com>
To: "user@hive.apache.org" <us...@hive.apache.org> 
Cc: "user@hive.apache.org" <us...@hive.apache.org> 
Sent: Sunday, June 3, 2012 8:20 PM
Subject: Re: FileNotFoundException
 
Did you setup the /usr/hive/warehouse directory in hdfs and do a chmod g+w on it? That would be required before you run any queries.

On Jun 3, 2012, at 1:53 AM, Павел Мезенцев <pa...@mezentsev.org> wrote:

> Hello all!
> 
> I tried to create simple table in hive
> > create table test (a string); 
> 
> But its failed:
> FAILED: Error in metadata: MetaException(message:Got exception: java.io.FileNotFoundException File file:/user/hive/warehouse/test does not exist.)
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
> 
> I set up hadoop and hive locally from couderra distribution CDH3 on Ubuntu 12.04.
> And use default settings.
> 
> What I do wrong?  How can I fix it?
> 
> Thank you!
> Best regards 
> Mezentsev Pavel
> Russia

Re: FileNotFoundException

Posted by ku...@gmail.com.
Did you setup the /usr/hive/warehouse directory in hdfs and do a chmod g+w on it? That would be required before you run any queries.

On Jun 3, 2012, at 1:53 AM, Павел Мезенцев <pa...@mezentsev.org> wrote:

> Hello all!
> 
> I tried to create simple table in hive
> > create table test (a string); 
> 
> But its failed:
> FAILED: Error in metadata: MetaException(message:Got exception: java.io.FileNotFoundException File file:/user/hive/warehouse/test does not exist.)
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
> 
> I set up hadoop and hive locally from couderra distribution CDH3 on Ubuntu 12.04.
> And use default settings.
> 
> What I do wrong?  How can I fix it?
> 
> Thank you!
> Best regards 
> Mezentsev Pavel
> Russia