class TensorFlowConfigEnvGenerator {

  public static String getTFConfigEnv(String componentName, int nWorkers,
      int nPs, String serviceName, String userName, String domain) {
    String commonEndpointSuffix = YarnServiceUtils
        .getDNSNameCommonSuffix(serviceName, userName, domain, 8000);

    TFConfigEnv tfConfigEnv =
        new TFConfigEnv(nWorkers, nPs, componentName, commonEndpointSuffix);
    return tfConfigEnv.toJson();
  }

}