Ejemplo n.º 1
0
  @Override
  protected void serviceStop() throws Exception {
    if (drainEventsOnStop) {
      blockNewEvents = true;
      LOG.info("AsyncDispatcher is draining to stop, igonring any new events.");
      synchronized (waitForDrained) {
        while (!drained && eventHandlingThread.isAlive()) {
          waitForDrained.wait(1000);
          LOG.info(
              "Waiting for AsyncDispatcher to drain. Thread state is :"
                  + eventHandlingThread.getState());
        }
      }
    }
    stopped = true;
    if (eventHandlingThread != null) {
      eventHandlingThread.interrupt();
      try {
        eventHandlingThread.join();
      } catch (InterruptedException ie) {
        LOG.warn("Interrupted Exception while stopping", ie);
      }
    }

    // stop all the components
    super.serviceStop();
  }
 @Override
 protected void serviceStop() throws Exception {
   if (server != null) {
     server.stop();
   }
   super.serviceStop();
   amRunning = false;
 }
 @Override
 public void serviceStop() throws Exception {
   if (isSession) {
     sessionStopped.set(true);
   }
   if (this.dagSubmissionTimer != null) {
     this.dagSubmissionTimer.cancel();
   }
   stopServices();
   super.serviceStop();
 }
Ejemplo n.º 4
0
 @Override
 protected void serviceStop() throws Exception {
   if (proxyServer != null) {
     try {
       proxyServer.stop();
     } catch (Exception e) {
       LOG.fatal("Error stopping proxy web server", e);
       throw new YarnRuntimeException("Error stopping proxy web server", e);
     }
   }
   super.serviceStop();
 }
Ejemplo n.º 5
0
  @Override
  public void serviceStop() throws Exception {
    LOG.info("Catalog Server (" + bindAddressStr + ") shutdown");

    // If CatalogServer shutdowns before it started, rpcServer and store may be NULL.
    // So, we should check Nullity of them.
    if (rpcServer != null) {
      this.rpcServer.shutdown();
    }
    if (store != null) {
      store.close();
    }
    super.serviceStop();
  }
Ejemplo n.º 6
0
 @Override
 protected void serviceStop() throws Exception {
   if (sched != null) {
     sched.shutdown();
     boolean terminated = false;
     try {
       terminated = sched.awaitTermination(10, SECONDS);
     } catch (InterruptedException e) {
     }
     if (terminated != true) {
       sched.shutdownNow();
     }
   }
   super.serviceStop();
 }
Ejemplo n.º 7
0
 @Override
 protected void serviceStop() throws Exception {
   if (stopped.getAndSet(true)) {
     // return if already stopped
     return;
   }
   if (allocatorThread != null) {
     allocatorThread.interrupt();
     try {
       allocatorThread.join();
     } catch (InterruptedException ie) {
       LOG.warn("InterruptedException while stopping", ie);
     }
   }
   if (shouldUnregister) {
     unregister();
   }
   super.serviceStop();
 }
 @Override
 public void serviceStop() throws Exception {
   ShutdownThreadsHelper.shutdownExecutorService(moveToDoneExecutor);
   super.serviceStop();
 }
Ejemplo n.º 9
0
 @Override
 protected void serviceStop() throws Exception {
   numStops++;
   ContainerAllocatorStopped = numStops;
   super.serviceStop();
 }