gpt4 book ai didi

org.apache.flink.yarn.highavailability.YarnPreConfiguredMasterNonHaServices.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 14:19:31 26 4
gpt4 key购买 nike

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

YarnPreConfiguredMasterNonHaServices.<init>介绍

[英]Creates new YarnPreConfiguredMasterHaServices for the given Flink and YARN configuration. This constructor parses the ResourceManager address from the Flink configuration and sets up the HDFS access to store recovery data in the YARN application's working directory.
[中]为给定的Flink和纱线配置创建新的YarnReconfigueredMasterhasServices。此构造函数解析Flink配置中的ResourceManager地址,并设置HDFS访问,以将恢复数据存储在应用程序的工作目录中。

代码示例

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

switch (mode) {
  case NONE:
    return new YarnPreConfiguredMasterNonHaServices(
      flinkConfig,
      hadoopConfig,

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

new YarnPreConfiguredMasterNonHaServices(
    flinkConfig,
    hadoopConfig,
  new YarnPreConfiguredMasterNonHaServices(
    flinkConfig,
    hadoopConfig,
new YarnPreConfiguredMasterNonHaServices(
  flinkConfig,
  hadoopConfig,

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

@Test
public void testCloseAndCleanup() throws Exception {
  final Configuration flinkConfig = new Configuration();
  flinkConfig.setString(YarnConfigOptions.APP_MASTER_RPC_ADDRESS, "localhost");
  flinkConfig.setInteger(YarnConfigOptions.APP_MASTER_RPC_PORT, 1427);
  // create the services
  YarnHighAvailabilityServices services = new YarnPreConfiguredMasterNonHaServices(
    flinkConfig,
    hadoopConfig,
    HighAvailabilityServicesUtils.AddressResolution.NO_ADDRESS_RESOLUTION);
  services.closeAndCleanupAllData();
  final FileSystem fileSystem = hdfsRootPath.getFileSystem();
  final Path workDir = new Path(hdfsCluster.getFileSystem().getWorkingDirectory().toString());
  try {
    fileSystem.getFileStatus(new Path(workDir, YarnHighAvailabilityServices.FLINK_RECOVERY_DATA_DIR));
    fail("Flink recovery data directory still exists");
  }
  catch (FileNotFoundException e) {
    // expected, because the directory should have been cleaned up
  }
  assertTrue(services.isClosed());
  // doing another cleanup when the services are closed should fail
  try {
    services.closeAndCleanupAllData();
    fail("should fail with an IllegalStateException");
  } catch (IllegalStateException e) {
    // expected
  }
}

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

flinkConfig.setInteger(YarnConfigOptions.APP_MASTER_RPC_PORT, 1427);
YarnHighAvailabilityServices services = new YarnPreConfiguredMasterNonHaServices(
  flinkConfig,
  hadoopConfig,

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

switch (mode) {
  case NONE:
    return new YarnPreConfiguredMasterNonHaServices(
      flinkConfig,
      hadoopConfig,

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

switch (mode) {
  case NONE:
    return new YarnPreConfiguredMasterNonHaServices(
      flinkConfig,
      hadoopConfig,

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