[ 
https://issues.apache.org/jira/browse/TEZ-1187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14025962#comment-14025962
 ] 

Rajesh Balamohan commented on TEZ-1187:
---------------------------------------

Thinking of the following changes at a high level for this JIRA.  Please let me 
know if this is fine.

- Define TezExecutorService interface + impl in o.a.t.r.c.threadpool. 
{code}
public interface TezExecutorService {
  
  /* get thread pool stats */
  public String getStats();

  public <T> ListenableFuture<T> submit(Callable<T> task);
  
  public void shutdown();
  
}
{code}

2.  TezChild can create TezExecutorService  and pass it to TezTaskRunner. 
TezExecutorService can be propagated to LogicalIOProcessorRuntimeTask and 
respective TezTaskContext.

3. Add getTezExecutorService() to TezTaskContext. Fetcher/Sorter etc can use 
this common thread pool to submit their tasks.

4. TezExecutorService should be shutdown when the task exits.

We can consider adding methods related to scheduled task execution later.


> Share Thread pools between different tasks
> ------------------------------------------
>
>                 Key: TEZ-1187
>                 URL: https://issues.apache.org/jira/browse/TEZ-1187
>             Project: Apache Tez
>          Issue Type: Sub-task
>            Reporter: Siddharth Seth
>
> Thread pools are used all over for fetchers, sort etc. When running a single 
> task - this is already a problem, and gets worse when running multiple tasks.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to