code: private int killSession(String sessionId)throws IOException {
      try {
        System.out.printf("Killing %s", sessionId);
        ClusterManagerService.Client client = getCMSClient();
        try {
          client.killSession(sessionId);
        } catch (SafeModeException e) {
          throw new IOException(
            "Cannot kill session yet, ClusterManager is in Safe Mode");
        }
        System.err.printf("%s killed", sessionId);
      } catch (TException e) {
        throw new IOException(e);
      }
      return 0;
    }
docs: Tells the cluster manager to kill the session with a given id
  @param sessionId the id of the session to kill
  @return 0 in case of success, non zero value on error
  @throws IOException