Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

execute async task on beeline

Solved Go to solution

execute async task on beeline

Rising Star

Hi all,

I have to execute a list of alter location statements on a hive table with two thousand partitions. To do that, I create a text file with the list of alter statements (one for each partition) and submit it to beeline, but it last a couple of hour, because beeline wait for each task to be executed. Is there a way to tell beeline to submit the task to hs2 at once?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

Re: execute async task on beeline

Cloudera Employee

Hi @Davide Vergari,

If you ask beeline to run commands in one file, they will run sequentially. However, you could try the following:

1. Split the queries in different files and run multiple beeline commands in different threads in your program.

2. Use JDBC where you can open multiple connections in different threads and run queries on each connection.

Hope that helps.

1 REPLY 1

Re: execute async task on beeline

Cloudera Employee

Hi @Davide Vergari,

If you ask beeline to run commands in one file, they will run sequentially. However, you could try the following:

1. Split the queries in different files and run multiple beeline commands in different threads in your program.

2. Use JDBC where you can open multiple connections in different threads and run queries on each connection.

Hope that helps.