public static ZkClient createZkClient(String connectString, int sessionTimeoutMS, int connectionTimeoutMs) {
    ZkClient zkClient;
    try {
      zkClient = new ZkClient(connectString, sessionTimeoutMS, connectionTimeoutMs, new ZkStringSerializer(), connectionTimeoutMs);
    } catch (Exception e) {
      // ZkClient constructor may throw a variety of different exceptions, not all of them Zk based.
      throw new SamzaException("zkClient failed to connect to ZK at :" + connectString, e);
    }

    // make sure the namespace in zk exists (if specified)
    validateZkNameSpace(connectString, zkClient);

    return zkClient;
  }
helper method to create zkClient
@param connectString - zkConnect string
@param sessionTimeoutMS - session timeout
@param connectionTimeoutMs - connection timeout
@return zkClient object
samza-core/src/main/java/org/apache/samza/zk/ZkCoordinationUtilsFactory.java