Repository: asterixdb Updated Branches: refs/heads/master 753576f38 -> 742679da2
Shutdown Http server executor on stop Change-Id: I5e177aaa3716110de211a7538b8c40b0d1f28b7c Reviewed-on: https://asterix-gerrit.ics.uci.edu/1543 Reviewed-by: Till Westmann <[email protected]> Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> BAD: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/742679da Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/742679da Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/742679da Branch: refs/heads/master Commit: 742679da2fd93664c514a83609567fea8eb66e2b Parents: 753576f Author: Abdullah Alamoudi <[email protected]> Authored: Thu Mar 2 13:27:07 2017 -0800 Committer: abdullah alamoudi <[email protected]> Committed: Thu Mar 2 16:50:32 2017 -0800 ---------------------------------------------------------------------- .../java/org/apache/hyracks/http/server/HttpServer.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/742679da/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java index 2f35b6a..8fe2b4f 100644 --- a/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java +++ b/hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java @@ -201,6 +201,15 @@ public class HttpServer { protected void doStop() throws InterruptedException { channel.close(); channel.closeFuture().sync(); + executor.shutdown(); + try { + executor.awaitTermination(1, TimeUnit.MINUTES); + if (!executor.isTerminated()) { + LOGGER.log(Level.SEVERE, "Failed to shutdown http server executor"); + } + } catch (Exception e) { + LOGGER.log(Level.SEVERE, "Error while shutting down http server executor", e); + } } public IServlet getServlet(FullHttpRequest request) {
