You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Mohan Agarwal <mo...@gmail.com> on 2009/11/03 14:22:38 UTC
Problem regarding external table
Hi,
I am using hive over hadoop-0.19.0 , I have created a external table
pointing its loaction at certain specified directory, and I have also
copied the data file (macthing the table structure) using hadoop dfs -put
command to that specified directory , but when I am printing the data of
external table it is shows nothing. Even the count(1) on the external table
is giving 0.
Please help me solve this problem.
Thanking You
Mohan Agarwal
Re: Problem regarding external table
Posted by Mohan Agarwal <mo...@gmail.com>.
Hi,
This problem is solved. Actually I was putting the data file in a
directory, which is not present under the hsdf home directory.
But when I copied the data file in a hdfs home directory, it start working
fine.
Thanking You
Mohan Agarwal
On Wed, Nov 4, 2009 at 12:23 PM, Zheng Shao <zs...@gmail.com> wrote:
> Hi Mohan,
>
> Most probably there are some exceptions in the process.
>
> Can you take a look at /tmp/<user>/hive.log ?
>
> Also, for "SELECT count(1)" Hive should generate a mapreduce job.
>
> Did you see that map-reduce job running? Did the map task and reduce task
> run smoothly? Can you take a look at their logs?
>
> Zheng
>
>
> On Tue, Nov 3, 2009 at 10:37 PM, Mohan Agarwal <mo...@gmail.com>wrote:
>
>> Hi,
>> Create table statement is :
>> CREATE TABLE dummy_table (foo INT, bar STRING)
>> COMMENT 'This is the staging page view table'
>> ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES
>> TERMINATED BY '10'
>> STORED AS TEXTFILE
>> LOCATION '/home/hadoop/user/data';
>>
>> Copy command is : hadoop dfs -put /home/hadoop/dummy_table.txt
>> /home/hadoop/user/data
>>
>> Dummy_table.txt is a simple comma delemiter file having content as
>> below:
>> 1,a
>> 2,a
>> 3,a
>>
>> File is getting copied properly,even I have print its content using hadoop
>> dfs -cat command, it is showing me all the records.
>>
>> But when I am firing a query "select * from dummy_table" on *hive over
>> hadoop-0.19.2* it is giving me nothing. Event when I an firing a query
>> "select count(1) from dummy_table" is giving 0 as a result.
>>
>> *This problem is occurring on hadoop-0.19.2 version of hadoop, but when
>> I am doing it on hadoop-0.20.0 version , it is happening successfully.
>>
>> *Please help me to solve this problem.
>>
>> Thanking You
>> Mohan Agarwal
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Tue, Nov 3, 2009 at 10:24 PM, Eric Arenas <ea...@rocketmail.com>wrote:
>>
>>> Hi Mohan,
>>>
>>> Can you please paste your create table statement?
>>>
>>> Also, have you checked that the target directory has data files that you
>>> want to load?
>>>
>>> regards,
>>> Eric Arenas
>>>
>>>
>>> ------------------------------
>>> *From:* Mohan Agarwal <mo...@gmail.com>
>>> *To:* hive-user@hadoop.apache.org
>>> *Sent:* Tue, November 3, 2009 5:22:38 AM
>>> *Subject:* Problem regarding external table
>>>
>>> Hi,
>>> I am using hive over hadoop-0.19.0 , I have created a external table
>>> pointing its loaction at certain specified directory, and I have also
>>> copied the data file (macthing the table structure) using hadoop dfs -put
>>> command to that specified directory , but when I am printing the data of
>>> external table it is shows nothing. Even the count(1) on the external table
>>> is giving 0.
>>> Please help me solve this problem.
>>>
>>> Thanking You
>>> Mohan Agarwal
>>>
>>>
>>>
>>
>>
>
>
> --
> Yours,
> Zheng
>
Re: Problem regarding external table
Posted by Zheng Shao <zs...@gmail.com>.
Hi Mohan,
Most probably there are some exceptions in the process.
Can you take a look at /tmp/<user>/hive.log ?
Also, for "SELECT count(1)" Hive should generate a mapreduce job.
Did you see that map-reduce job running? Did the map task and reduce task
run smoothly? Can you take a look at their logs?
Zheng
On Tue, Nov 3, 2009 at 10:37 PM, Mohan Agarwal <mo...@gmail.com>wrote:
> Hi,
> Create table statement is :
> CREATE TABLE dummy_table (foo INT, bar STRING)
> COMMENT 'This is the staging page view table'
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES
> TERMINATED BY '10'
> STORED AS TEXTFILE
> LOCATION '/home/hadoop/user/data';
>
> Copy command is : hadoop dfs -put /home/hadoop/dummy_table.txt
> /home/hadoop/user/data
>
> Dummy_table.txt is a simple comma delemiter file having content as
> below:
> 1,a
> 2,a
> 3,a
>
> File is getting copied properly,even I have print its content using hadoop
> dfs -cat command, it is showing me all the records.
>
> But when I am firing a query "select * from dummy_table" on *hive over
> hadoop-0.19.2* it is giving me nothing. Event when I an firing a query
> "select count(1) from dummy_table" is giving 0 as a result.
>
> *This problem is occurring on hadoop-0.19.2 version of hadoop, but when I
> am doing it on hadoop-0.20.0 version , it is happening successfully.
>
> *Please help me to solve this problem.
>
> Thanking You
> Mohan Agarwal
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Tue, Nov 3, 2009 at 10:24 PM, Eric Arenas <ea...@rocketmail.com>wrote:
>
>> Hi Mohan,
>>
>> Can you please paste your create table statement?
>>
>> Also, have you checked that the target directory has data files that you
>> want to load?
>>
>> regards,
>> Eric Arenas
>>
>>
>> ------------------------------
>> *From:* Mohan Agarwal <mo...@gmail.com>
>> *To:* hive-user@hadoop.apache.org
>> *Sent:* Tue, November 3, 2009 5:22:38 AM
>> *Subject:* Problem regarding external table
>>
>> Hi,
>> I am using hive over hadoop-0.19.0 , I have created a external table
>> pointing its loaction at certain specified directory, and I have also
>> copied the data file (macthing the table structure) using hadoop dfs -put
>> command to that specified directory , but when I am printing the data of
>> external table it is shows nothing. Even the count(1) on the external table
>> is giving 0.
>> Please help me solve this problem.
>>
>> Thanking You
>> Mohan Agarwal
>>
>>
>>
>
>
--
Yours,
Zheng
Re: Problem regarding external table
Posted by Mohan Agarwal <mo...@gmail.com>.
Hi,
Create table statement is :
CREATE TABLE dummy_table (foo INT, bar STRING)
COMMENT 'This is the staging page view table'
ROW FORMAT DELIMITED FIELDS TERMINATED BY '44' LINES TERMINATED
BY '10'
STORED AS TEXTFILE
LOCATION '/home/hadoop/user/data';
Copy command is : hadoop dfs -put /home/hadoop/dummy_table.txt
/home/hadoop/user/data
Dummy_table.txt is a simple comma delemiter file having content as
below:
1,a
2,a
3,a
File is getting copied properly,even I have print its content using hadoop
dfs -cat command, it is showing me all the records.
But when I am firing a query "select * from dummy_table" on *hive over
hadoop-0.19.2* it is giving me nothing. Event when I an firing a query
"select count(1) from dummy_table" is giving 0 as a result.
*This problem is occurring on hadoop-0.19.2 version of hadoop, but when I
am doing it on hadoop-0.20.0 version , it is happening successfully.
*Please help me to solve this problem.
Thanking You
Mohan Agarwal
On Tue, Nov 3, 2009 at 10:24 PM, Eric Arenas <ea...@rocketmail.com> wrote:
> Hi Mohan,
>
> Can you please paste your create table statement?
>
> Also, have you checked that the target directory has data files that you
> want to load?
>
> regards,
> Eric Arenas
>
>
> ------------------------------
> *From:* Mohan Agarwal <mo...@gmail.com>
> *To:* hive-user@hadoop.apache.org
> *Sent:* Tue, November 3, 2009 5:22:38 AM
> *Subject:* Problem regarding external table
>
> Hi,
> I am using hive over hadoop-0.19.0 , I have created a external table
> pointing its loaction at certain specified directory, and I have also
> copied the data file (macthing the table structure) using hadoop dfs -put
> command to that specified directory , but when I am printing the data of
> external table it is shows nothing. Even the count(1) on the external table
> is giving 0.
> Please help me solve this problem.
>
> Thanking You
> Mohan Agarwal
>
>
>
Re: Problem regarding external table
Posted by Eric Arenas <ea...@rocketmail.com>.
Hi Mohan,
Can you please paste your create table statement?
Also, have you checked that the target directory has data files that you want to load?
regards,
Eric Arenas
________________________________
From: Mohan Agarwal <mo...@gmail.com>
To: hive-user@hadoop.apache.org
Sent: Tue, November 3, 2009 5:22:38 AM
Subject: Problem regarding external table
Hi,
I am using hive over hadoop-0.19.0 , I have created a external table pointing its loaction at certain specified directory, and I have also copied the data file (macthing the table structure) using hadoop dfs -put command to that specified directory , but when I am printing the data of external table it is shows nothing. Even the count(1) on the external table is giving 0.
Please help me solve this problem.
Thanking You
Mohan Agarwal