public static YarnHighAvailabilityServices forSingleJobAppMaster ( Configuration flinkConfig , org . apache . hadoop . conf . Configuration hadoopConfig ) throws IOException { checkNotNull ( flinkConfig , "flinkConfig" ) ; checkNotNull ( hadoopConfig , "hadoopConfig" ) ; final HighAvailabilityMode mode = HighAvailabilityMode . fromConfig ( flinkConfig ) ; switch ( mode ) { case NONE : return new YarnIntraNonHaMasterServices ( flinkConfig , hadoopConfig ) ; case ZOOKEEPER : throw new UnsupportedOperationException ( "to be implemented" ) ; default : throw new IllegalConfigurationException ( "Unrecognized high availability mode: " + mode ) ; } }
Creates the high - availability services for a single - job Flink YARN application to be used in the Application Master that runs both ResourceManager and JobManager .