You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/09/16 19:55:41 UTC
[GitHub] [hadoop] virajjasani commented on a diff in pull request #4879: HADOOP-18186. s3a prefetching to use SemaphoredDelegatingExecutor for submitting work (ADDENDUM)
virajjasani commented on code in PR #4879:
URL: https://github.com/apache/hadoop/pull/4879#discussion_r973343199
##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/prefetch/ExecutorServiceFuturePool.java:
##########
@@ -64,6 +70,18 @@ public Future<Void> executeRunnable(final Runnable r) {
return (Future<Void>) executor.submit(r::run);
}
+ /**
+ * Utility to shutdown the {@link ExecutorService} used by this class. Will wait up to a
+ * certain timeout for the ExecutorService to gracefully shutdown.
+ *
+ * @param logger Logger
+ * @param timeout the maximum time to wait
+ * @param unit the time unit of the timeout argument
+ */
+ public void shutdown(Logger logger, long timeout, TimeUnit unit) {
+ HadoopExecutors.shutdown(executor, logger, timeout, unit);
Review Comment:
Because the executor that we are shutting down is private to the ExecutorServiceFuturePool.
--
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.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org