asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Shutdown Http server executor on stop
Date Fri, 03 Mar 2017 00:50:53 GMT
abdullah alamoudi has submitted this change and it was merged.

Change subject: Shutdown Http server executor on stop
......................................................................


Shutdown Http server executor on stop

Change-Id: I5e177aaa3716110de211a7538b8c40b0d1f28b7c
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1543
Reviewed-by: Till Westmann <tillw@apache.org>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
---
M hyracks-fullstack/hyracks/hyracks-http/src/main/java/org/apache/hyracks/http/server/HttpServer.java
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Till Westmann: Looks good to me, approved
  Jenkins: Verified; No violations found; No violations found; Verified



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 @@
     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) {

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1543
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e177aaa3716110de211a7538b8c40b0d1f28b7c
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>
Gerrit-Reviewer: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <tillw@apache.org>
Gerrit-Reviewer: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message