Support Questions

Find answers, ask questions, and share your expertise

execute async task on beeline

avatar
Expert Contributor

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

avatar
Contributor

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.

View solution in original post

1 REPLY 1

avatar
Contributor

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.