Reply
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Running impala query with specified resosurce pool

Hi,

 

I'm using set request_pool= to run an impala query with specific resource pool, but with no success.

 

When i connect to impala-shell and run set request_pool=xxx, I get REQUEST_POOL set to xxx, after running my query i see it still running under the default pool.

 

How i can also pass this if i want to run the impala-shell with variables like impala-shell -i xxxx -q yyyy., Can i add to this commnad the set request_pool.

 

Thanks in advance

Posts: 642
Topics: 3
Kudos: 105
Solutions: 67
Registered: ‎08-16-2016

Re: Running impala query with specified resosurce pool

Make sure that you have the placement rule to allow pools to be specified at runtime. This got me one time and I kept getting the messages that it was set but it would continue to run in the default queue.

As for running it with -q. I haven't tried it but I imaged it would be similar to hive.

impala-shell -i xxxx -q request_pool=new_pool; select...
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Running impala query with specified resosurce pool

Sure i have a placement rule:

Use the pool specified at run time and create the pool if it does not exist.

Also me getting that the pool set but the queries still running at the
default pool.

Did you get it resolved?
Posts: 642
Topics: 3
Kudos: 105
Solutions: 67
Registered: ‎08-16-2016

Re: Running impala query with specified resosurce pool

My issue was that I didn't have that placement rule in place. I created the placement rule to allow it to be specified at runtime and then my queries were assigned to the correct queue.

Is that rule above (have a lower number) than the default pool rule?

The other item to check is that the user you are running the queries from has access to submit to the pool.
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Running impala query with specified resosurce pool

No.

This is the higher placement rule:

1

Use the pool specified at runtime and create the pool if it does not exist.
Edit
2

Use the pool root.[username], only if the pool exists.
Edit
3

Use the pool root.default.
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Running impala query with specified resosurce pool

[ Edited ]

Seems also this option is not working at all:

 

impala-shell -i xxxx -q request_pool=new_pool; select...

 

tried to run 

 

impala-shell -i xxxx -q request_pool=new_pool;mpala-shell -i xxxx -q select ...

 

impala-shell -i xxxx -q "request_pool=new_pool" " select ..."

 

impala-shell -i xxxx -q "request_pool=new_pool"; -q " select ..."

 

 

 

 

Highlighted
Expert Contributor
Posts: 263
Registered: ‎01-25-2017

Re: Running impala query with specified resosurce pool

My bad: forgot that -q is used for a single query use.

 

I solved the issue by putting the 2 select statement at file and used the -f option.

 

Still investigate the issue of the pool.

Announcements