org.apache.flink.yarn.AbstractYarnClusterDescriptor Java Examples

The following examples show how to use org.apache.flink.yarn.AbstractYarnClusterDescriptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AthenaXYarnClusterDescriptor.java    From AthenaX with Apache License 2.0 6 votes vote down vote up
@Override
protected ClusterClient<ApplicationId> createYarnClusterClient(
    AbstractYarnClusterDescriptor clusterDescriptor,
    int numberTaskManagers,
    int slotPerTaskManager,
    ApplicationReport applicationReport,
    Configuration configuration,
    boolean isNewlyCreatedCluster) throws Exception {
  return new YarnClusterClient(
      clusterDescriptor,
      numberTaskManagers,
      slotPerTaskManager,
      applicationReport,
      configuration,
      isNewlyCreatedCluster);
}
 
Example #2
Source File: FlinkYarnSessionCli.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public AbstractYarnClusterDescriptor createClusterDescriptor(CommandLine commandLine) throws FlinkException {
	final Configuration effectiveConfiguration = applyCommandLineOptionsToConfiguration(commandLine);

	return createDescriptor(
		effectiveConfiguration,
		yarnConfiguration,
		configurationDirectory,
		commandLine);
}
 
Example #3
Source File: FlinkYarnSessionCli.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
private AbstractYarnClusterDescriptor getClusterDescriptor(
		Configuration configuration,
		YarnConfiguration yarnConfiguration,
		String configurationDirectory) {
	final YarnClient yarnClient = YarnClient.createYarnClient();
	yarnClient.init(yarnConfiguration);
	yarnClient.start();

	return new YarnClusterDescriptor(
		configuration,
		yarnConfiguration,
		configurationDirectory,
		yarnClient,
		false);
}
 
Example #4
Source File: NonDeployingYarnClusterDescriptor.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
protected ClusterClient<ApplicationId> createYarnClusterClient(
		AbstractYarnClusterDescriptor descriptor,
		int numberTaskManagers,
		int slotsPerTaskManager,
		ApplicationReport report,
		Configuration flinkConfiguration,
		boolean perJobCluster) {
	return clusterClient;
}
 
Example #5
Source File: FlinkYarnSessionCli.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public AbstractYarnClusterDescriptor createClusterDescriptor(CommandLine commandLine) throws FlinkException {
	final Configuration effectiveConfiguration = applyCommandLineOptionsToConfiguration(commandLine);

	return createDescriptor(
		effectiveConfiguration,
		yarnConfiguration,
		configurationDirectory,
		commandLine);
}
 
Example #6
Source File: FlinkYarnSessionCli.java    From flink with Apache License 2.0 5 votes vote down vote up
private AbstractYarnClusterDescriptor getClusterDescriptor(
		Configuration configuration,
		YarnConfiguration yarnConfiguration,
		String configurationDirectory) {
	final YarnClient yarnClient = YarnClient.createYarnClient();
	yarnClient.init(yarnConfiguration);
	yarnClient.start();

	return new YarnClusterDescriptor(
		configuration,
		yarnConfiguration,
		configurationDirectory,
		yarnClient,
		false);
}
 
Example #7
Source File: NonDeployingYarnClusterDescriptor.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
protected ClusterClient<ApplicationId> createYarnClusterClient(
		AbstractYarnClusterDescriptor descriptor,
		int numberTaskManagers,
		int slotsPerTaskManager,
		ApplicationReport report,
		Configuration flinkConfiguration,
		boolean perJobCluster) {
	return clusterClient;
}
 
Example #8
Source File: YarnJobDescriptor.java    From sylph with Apache License 2.0 5 votes vote down vote up
@Override
protected ClusterClient<ApplicationId> createYarnClusterClient(
        AbstractYarnClusterDescriptor descriptor,
        int numberTaskManagers,
        int slotsPerTaskManager,
        ApplicationReport report,
        Configuration flinkConfiguration,
        boolean perJobCluster)
        throws Exception
{
    return new RestClusterClient<>(flinkConfiguration, report.getApplicationId());
}