code: public void shutdown() {
      if (purgeThread != null) {
        WaitingRoomPurger purger = (WaitingRoomPurger) purgeThread.getRunnable();
        purger.shutdown();
      }
  
      RPC.stopProxy(namenode);
      if (server != null) server.stop();
    }
docs: Shutdown snapshot node and attached daemons