Search code examples
linuxhadoopmapreducecygwinhive

Hive command line through Cygwin select query error


I'm using Hadoop 2.4.0 Hortonworks

I pretty new to Hadoop and am currently using Hue/Beeswax to run my standard queries which work fine, however, I now need to start creating basic shell scripts to do slightly more complex queries. Since I'm on a Win7 machine I've install Cygwin and using SSH to connect to a Hadoop server. When trying a simple test query I get the following error: -

hive -e "select actual_date from dm.date_dim limit 10"

AccessControlException: User blah cannot submit applications to queue root.default

At someone's suggestion I've tried changing the queue name first: -

set mapred.job.queuename=foo

Note, that if I run the same query but select all, i.e. so no MapReduce jobs are required, the query is successful: -

hive -e "select * from dm.date_dim limit 10"

My IT dept and other internal shell script developers are being very slow to respond to this (many days) so is there anything that you can suggest I should check or try. I was told that if changing the queue name had worked then I could've put that within my .hiverc file which I'm not sure where that is.

Is this a permissions thing? Should I be configuring something else?

I'd appreciate any help, but be aware I'm only started learning Linux very recently so you may need to dumb down any responses.


Solution

  • Your organization must have specified some queues to allocate the cluster resources to multiple teams. So any query other than 'select *' wont't run if you don't specify the job queue. So while running your hive queries just add this config and your queries will run:

    hive -hiveconf mapred.job.queue.name=foo -e "select actual_date from dm.date_dim limit 10"