public boolean isDeregisteredWithZooKeeper() {
    if (serviceDiscovery && !activePassiveHA) {
      if (zooKeeperHelper != null) {
        return zooKeeperHelper.isDeregisteredWithZooKeeper();
      }
    }
    return false;
  }
@return true if the server instance was deregistered from ZooKeeper, else false. The function might
be called even when the instance is not registered with the ZooKeeper (See
SessionManage.closeSessionInternal()). In that case, return false since the deregistration has
not really happened.
service/src/java/org/apache/hive/service/server/HiveServer2.java