[ https://issues.apache.org/jira/browse/HADOOP-19609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18018784#comment-18018784 ]
ASF GitHub Bot commented on HADOOP-19609: ----------------------------------------- bhattmanish98 commented on code in PR #7817: URL: https://github.com/apache/hadoop/pull/7817#discussion_r2329733766 ########## hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsConnectionManager.java: ########## @@ -192,12 +204,20 @@ public boolean cancel() { * If so, it starts a new thread to cache extra connections. */ private void triggerConnectionRefreshIfNeeded() { - if (kac.size() <= abfsConfiguration.getApacheMinTriggerRefreshCount() - && !isCacheRefreshInProgress.get() && !kac.getIsClosed()) { + if (!isCacheRefreshInProgress.get() && !kac.getIsClosed() + && kac.getFixedThreadPool() != null + && kac.getSingleThreadPool() != null + && kac.size() + <= abfsConfiguration.getApacheMinTriggerRefreshCount()) { // Use a single-threaded executor or thread pool instead of raw thread - kac.getSingleThreadExecutor().submit(() -> - cacheExtraConnection(route, - abfsConfiguration.getApacheCacheRefreshCount())); + try { + kac.getSingleThreadPool().submit(() -> + cacheExtraConnection(route, + abfsConfiguration.getApacheCacheRefreshCount())); + } catch (RejectedExecutionException e) { Review Comment: Yes, no extra connection will be created in this case and flow will return as it is. > ABFS: Apache Client Connection Pool Relook > ------------------------------------------ > > Key: HADOOP-19609 > URL: https://issues.apache.org/jira/browse/HADOOP-19609 > Project: Hadoop Common > Issue Type: Sub-task > Components: fs/azure > Affects Versions: 3.4.1 > Reporter: Manish Bhatt > Assignee: Manish Bhatt > Priority: Major > Labels: pull-request-available > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org