hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-8003) Threads#getBoundedCachedThreadPool harcodes the time unit to seconds
Date Wed, 06 Mar 2013 01:52:14 GMT

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

Hudson commented on HBASE-8003:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #431 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/431/])
    HBASE-8003  Threads#getBoundedCachedThreadPool harcodes the time unit to seconds (Revision
1452912)

     Result = FAILURE
nkeywal : 
Files : 
* /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java

                
> Threads#getBoundedCachedThreadPool harcodes the time unit to seconds
> --------------------------------------------------------------------
>
>                 Key: HBASE-8003
>                 URL: https://issues.apache.org/jira/browse/HBASE-8003
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.98.0
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Trivial
>             Fix For: 0.98.0
>
>         Attachments: 8003.v1.patch, 8003.v1.patch
>
>
>   /**
>    * Create a new CachedThreadPool with a bounded number as the maximum 
>    * thread size in the pool.
>    * 
>    * @param maxCachedThread the maximum thread could be created in the pool
>    * @param timeout the maximum time to wait
>    * @param unit the time unit of the timeout argument
>    * @param threadFactory the factory to use when creating new threads
>    * @return threadPoolExecutor the cachedThreadPool with a bounded number 
>    * as the maximum thread size in the pool. 
>    */
>   public static ThreadPoolExecutor getBoundedCachedThreadPool(
>       int maxCachedThread, long timeout, TimeUnit unit,
>       ThreadFactory threadFactory) {
>     ThreadPoolExecutor boundedCachedThreadPool =
>       new ThreadPoolExecutor(maxCachedThread, maxCachedThread, timeout,
>         TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory);
>     // allow the core pool threads timeout and terminate
>     boundedCachedThreadPool.allowCoreThreadTimeOut(true);
>     return boundedCachedThreadPool;
>   }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message