Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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.