@Override
    public void execute() {
      try {
        deleteServerInstancesFromZooKeeper(versionNumber);
      } catch (Exception e) {
        LOG.error("Error deregistering HiveServer2 instances for version: " + versionNumber
            + " from ZooKeeper", e);
        System.out.println("Error deregistering HiveServer2 instances for version: " + versionNumber
            + " from ZooKeeper." + e);
        System.exit(-1);
      }
      System.exit(0);
    }
DeregisterOptionExecutor: executes the --deregister option by deregistering all HiveServer2
instances from ZooKeeper of a specific version.
service/src/java/org/apache/hive/service/server/HiveServer2.java