gpt4 book ai didi

org.apache.flink.yarn.entrypoint.YarnEntrypointUtils类的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 21:43:31 24 4
gpt4 key购买 nike

本文整理了Java中org.apache.flink.yarn.entrypoint.YarnEntrypointUtils类的一些代码示例,展示了YarnEntrypointUtils类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnEntrypointUtils类的具体详情如下:
包路径:org.apache.flink.yarn.entrypoint.YarnEntrypointUtils
类名称:YarnEntrypointUtils

YarnEntrypointUtils介绍

[英]This class contains utility methods for the YarnSessionClusterEntrypoint and YarnJobClusterEntrypoint.
[中]此类包含用于YarnSessionClusterEntrypoint和YarnJobClusterEntrypoint的实用程序方法。

代码示例

代码示例来源:origin: apache/flink

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

代码示例来源:origin: apache/flink

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnJobClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnJobClusterEntrypoint yarnJobClusterEntrypoint = new YarnJobClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnJobClusterEntrypoint);
  }
}

代码示例来源:origin: apache/flink

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnSessionClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnSessionClusterEntrypoint yarnSessionClusterEntrypoint = new YarnSessionClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnSessionClusterEntrypoint);
  }
}

代码示例来源:origin: apache/flink

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnJobClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnJobClusterEntrypoint yarnJobClusterEntrypoint = new YarnJobClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnJobClusterEntrypoint);
  }
}

代码示例来源:origin: org.apache.flink/flink-yarn

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnSessionClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnSessionClusterEntrypoint yarnSessionClusterEntrypoint = new YarnSessionClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnSessionClusterEntrypoint);
  }
}

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

代码示例来源:origin: org.apache.flink/flink-yarn

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnJobClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnJobClusterEntrypoint yarnJobClusterEntrypoint = new YarnJobClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnJobClusterEntrypoint);
  }
}

代码示例来源:origin: org.apache.flink/flink-yarn

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

代码示例来源:origin: org.apache.flink/flink-yarn

public static void main(String[] args) {
    // startup checks and logging
    EnvironmentInformation.logEnvironmentInfo(LOG, YarnSessionClusterEntrypoint.class.getSimpleName(), args);
    SignalHandler.register(LOG);
    JvmShutdownSafeguard.installAsShutdownHook(LOG);

    Map<String, String> env = System.getenv();

    final String workingDirectory = env.get(ApplicationConstants.Environment.PWD.key());
    Preconditions.checkArgument(
      workingDirectory != null,
      "Working directory variable (%s) not set",
      ApplicationConstants.Environment.PWD.key());

    try {
      YarnEntrypointUtils.logYarnEnvironmentInformation(env, LOG);
    } catch (IOException e) {
      LOG.warn("Could not log YARN environment information.", e);
    }

    Configuration configuration = YarnEntrypointUtils.loadConfiguration(workingDirectory, env, LOG);

    YarnSessionClusterEntrypoint yarnSessionClusterEntrypoint = new YarnSessionClusterEntrypoint(
      configuration,
      workingDirectory);

    ClusterEntrypoint.runClusterEntrypoint(yarnSessionClusterEntrypoint);
  }
}

代码示例来源:origin: org.apache.flink/flink-yarn_2.11

@Override
protected SecurityContext installSecurityContext(Configuration configuration) throws Exception {
  return YarnEntrypointUtils.installSecurityContext(configuration, workingDirectory);
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com