class PSAgent {

  public void error(String errorMsg) {
    if (!exitedFlag.getAndSet(true)) {
      LOG.info("psagent falied");
      // Stop all modules
      if (executor != null) {
        executor.error(errorMsg);
      } else {
        stop();
      }
    }
  }

  public  PSAgent(String masterIp, int masterPort, int clientIndex);
  public  PSAgent(Configuration conf, String masterIp, int masterPort, int clientIndex);
  public  PSAgent(Configuration conf, ApplicationId appId, String user, String masterIp,
                 int masterPort, boolean needHeartBeat, Executor executor);
  public  PSAgent(Configuration conf, String masterIp, int masterPort, int clientIndex,
                 boolean needHeartBeat, Executor executor);

}