Search in sources :

Example 1 with ClusterClientFactory

use of org.apache.flink.client.deployment.ClusterClientFactory in project flink by apache.

the class KubernetesSessionCliTest method testResumeFromKubernetesID.

@Test
public void testResumeFromKubernetesID() throws Exception {
    final KubernetesSessionCli cli = createFlinkKubernetesCustomCliWithJmAndTmTotalMemory(1024);
    final String clusterId = "my-test-CLUSTER_ID";
    final String[] args = new String[] { "-e", KubernetesSessionClusterExecutor.NAME, "-D" + KubernetesConfigOptions.CLUSTER_ID.key() + "=" + clusterId };
    final Configuration executorConfig = cli.getEffectiveConfiguration(args);
    final ClusterClientFactory clientFactory = getClusterClientFactory(executorConfig);
    assertEquals(clusterId, clientFactory.getClusterId(executorConfig));
}
Also used : Configuration(org.apache.flink.configuration.Configuration) ClusterClientFactory(org.apache.flink.client.deployment.ClusterClientFactory) Test(org.junit.Test)

Aggregations

ClusterClientFactory (org.apache.flink.client.deployment.ClusterClientFactory)1 Configuration (org.apache.flink.configuration.Configuration)1 Test (org.junit.Test)1