try to put the query in a file called <name>.hql don't forget to add exit! to 
the bottom.

Then run it as 

hive -f <name>.hql > name.log

The output will be streamed to that file.

In general you should see both the execution and result. if you do the way I 
mentioned, you would only see the result from query in the file.

HTH

Sent from my iPad

> On 16 May 2015, at 12:40, Anand Murali <anand_vi...@yahoo.com> wrote:
> 
> Dear All:
> 
> I am new to hive so pardon my ignorance. I have the following query but do 
> not see any output. I wondered it maybe in HDFS and checked there and do not 
> find it there. Can somebody advise
> 
> hive> select year, MAX(Temperature) from records where temperature <> 9999 
> and (quality = 0 or quality = 1 or quality = 4 or quality = 5 or quality = 9)
>     > group by year
>     > ;
> Query ID = anand_vihar_20150516170505_9b23d8ba-19d7-4fa7-b972-4f199e3bf56a
> Total jobs = 1
> Launching Job 1 out of 1
> Number of reduce tasks not specified. Estimated from input data size: 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 mapreduce.job.reduces=<number>
> Job running in-process (local Hadoop)
> 2015-05-16 17:05:11,504 Stage-1 map = 100%,  reduce = 100%
> Ended Job = job_local927727978_0003
> MapReduce Jobs Launched: 
> Stage-Stage-1:  HDFS Read: 5329140 HDFS Write: 0 SUCCESS
> Total MapReduce CPU Time Spent: 0 msec
> OK
> Time taken: 1.258 seconds
> 
> Thanks
>  
> Anand Murali  
> 

Reply via email to