[ 
https://issues.apache.org/jira/browse/HIVE-23324?focusedWorklogId=461618&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-461618
 ]

ASF GitHub Bot logged work on HIVE-23324:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jul/20 14:43
            Start Date: 21/Jul/20 14:43
    Worklog Time Spent: 10m 
      Work Description: belugabehr commented on pull request #1275:
URL: https://github.com/apache/hive/pull/1275#issuecomment-661904392


   Let us not re-invent the wheel here:
   
   ```
     public static void main(String[] args) throws IOException
     {
   
       ExecutorService service = Executors.newFixedThreadPool(2);
       CompletionService<String> completionService = new 
ExecutorCompletionService<>(service);
   
       for (int i = 0; i < 10; i++)
       {
         final int t = i;
         completionService.submit(() -> {
           return clean("File" + t);
         });
       }
   
       for (int i = 0; i < 10; ++i) {
         try {
             String path = completionService.take().get();
             System.out.println(path);
         } catch (Exception ignore) {}
     }
     }
   
     public static String clean(String path)
     {
       return "Cleaned: " + path;
     }
   ```
   
   
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorCompletionService.html


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 461618)
    Time Spent: 1h 40m  (was: 1.5h)

> Parallelise compaction directory cleaning process
> -------------------------------------------------
>
>                 Key: HIVE-23324
>                 URL: https://issues.apache.org/jira/browse/HIVE-23324
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Marton Bod
>            Assignee: Adesh Kumar Rao
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> Initiator processes the various compaction candidates in parallel, so we 
> could follow a similar approach in Cleaner where we currently clean the 
> directories sequentially.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to