Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Select statement does not return data...


Copy link to this message
-
Re: Select statement does not return data...
Nitin Pawar 2014-01-14, 19:18
Can you tell me the steps you followed match below steps
1) create statement with proper syntax
2) loaded data from local file to table
3) then run select * from table limit 2 (this does not run mapreduce
program .. it just uses hdfs api and shows data)
4) select * from table where col = value (this will run a mapreduce job and
you will on console how much of query is executed and at the end you will
get the output of query on the console, depending on your cluster size and
data size it may take anything from 5 seconds to a minute or more)

If you are not getting mapreduce job started, then you may want to check
your jobtracker log and see whats wrong that it is not able to start the
job. You will get the output of query in step 4 only when the mapreduce job
is finished

also if you do ./hdfs dfs -ls  /user/hive/warehouse/example1/
then it will show you the files for that table only.
On Wed, Jan 15, 2014 at 12:30 AM, Kennedy, Sean C.
<[EMAIL PROTECTED]>wrote:

> Nitin,
>
>     Thank you for the look..   I thought this would be as easy using
> regular sql J
>
> I cannot run selects on my columns in the database tables as well.
> However if I do a select * on the whole  table get data back…
>
> When I run:  select batch_id from example1;     I get the data…
>
>
>
>
>
> I am a little concerned with the zero length files…
>
>
>
> ./hdfs dfs -ls /user/hive/warehouse
>
> Found 4 items
>
> drwxr-xr-x   - hduser supergroup          0 2014-01-14 11:33
> /user/hive/warehouse/example1
>
> drwxr-xr-x   - hduser supergroup          0 2014-01-14 09:58
> /user/hive/warehouse/miidata1
>
> drwxr-xr-x   - hduser supergroup          0 2014-01-14 11:08
> /user/hive/warehouse/miidata2
>
> drwxr-xr-x   - hduser supergroup          0 2014-01-12 11:42
> /user/hive/warehouse/pokes
>
>
>
>
>
> *From:* Nitin Pawar [mailto:[EMAIL PROTECTED]]
> *Sent:* Tuesday, January 14, 2014 1:42 PM
> *To:* [EMAIL PROTECTED]
> *Subject:* Re: Select statement does not return data...
>
>
>
> this is not complete log.
>
>
>
> Can you paste last few lines of the console when you get hive prompt again
> on cli.
>
>
>
> Also check by running hadoop dfs -ls <table location> and see if you have
> got data loaded into table
>
>
>
> On Wed, Jan 15, 2014 at 12:07 AM, Kennedy, Sean C. <[EMAIL PROTECTED]>
> wrote:
>
>
>
> My select does not return data?   Any help?  The example1 table is there..
>
>
>
>
>
>
>
> hive> SELECT COUNT(1) FROM example1;
>
> Total MapReduce jobs = 1
>
> Launching Job 1 out of 1
>
> Number of reduce tasks determined at compile time: 1
>
> In order to change the average load for a reducer (in bytes):
>
>   set hive.exec.reducers.bytes.per.reducer=<number>
>
> In order to limit the maximum number of reducers:
>
>   set hive.exec.reducers.max=<number>
>
> In order to set a constant number of reducers:
>
>   set mapred.reduce.tasks=<number>
>
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates Direct contact information
> for affiliates is available at
> http://www.merck.com/contact/contacts.html) that may be confidential,
> proprietary copyrighted and/or legally privileged. It is intended solely
> for the use of the individual or entity named on this message. If you are
> not the intended recipient, and have received this message in error,
> please notify us immediately by reply e-mail and then delete it from
> your system.
>
>
>
>
>
> --
> Nitin Pawar
>
> Notice:  This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates Direct contact information
> for affiliates is available at
> http://www.merck.com/contact/contacts.html) that may be confidential,
> proprietary copyrighted and/or legally privileged. It is intended solely
> for the use of the individual or entity named on this message. If you are

Nitin Pawar