- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
execute async task on beeline
- Labels:
-
Apache Hive
Created ‎02-16-2017 09:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created ‎02-16-2017 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎02-16-2017 10:54 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
