public class Fabric8FlinkKubeClient extends Object implements FlinkKubeClient
FlinkKubeClient.FlinkKubeClient.PodCallbackHandler| 构造器和说明 |
|---|
Fabric8FlinkKubeClient(org.apache.flink.configuration.Configuration flinkConfig,
io.fabric8.kubernetes.client.KubernetesClient client,
java.util.function.Supplier<ExecutorService> asyncExecutorFactory) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
createJobManagerComponent(KubernetesJobManagerSpecification kubernetesJMSpec)
Create the Master components, this can include the Deployment, the ConfigMap(s), and the Service(s).
|
CompletableFuture<Void> |
createTaskManagerPod(KubernetesPod kubernetesPod)
Create task manager pod.
|
List<KubernetesPod> |
getPodsWithLabels(Map<String,String> labels)
List the pods with specified labels.
|
Optional<Endpoint> |
getRestEndpoint(String clusterId)
Get the rest endpoint for access outside cluster.
|
Optional<KubernetesService> |
getRestService(String clusterId)
Get the kubernetes rest service of the given flink clusterId.
|
void |
handleException(Exception e)
Log exceptions.
|
void |
stopAndCleanupCluster(String clusterId)
Stop cluster and clean up all resources, include services, auxiliary services and all running pods.
|
CompletableFuture<Void> |
stopPod(String podName)
Stop a specified pod by name.
|
KubernetesWatch |
watchPodsAndDoCallback(Map<String,String> labels,
FlinkKubeClient.PodCallbackHandler podCallbackHandler)
Watch the pods selected by labels and do the
FlinkKubeClient.PodCallbackHandler. |
public Fabric8FlinkKubeClient(org.apache.flink.configuration.Configuration flinkConfig,
io.fabric8.kubernetes.client.KubernetesClient client,
java.util.function.Supplier<ExecutorService> asyncExecutorFactory)
public void createJobManagerComponent(KubernetesJobManagerSpecification kubernetesJMSpec)
FlinkKubeClientcreateJobManagerComponent 在接口中 FlinkKubeClientkubernetesJMSpec - jobmanager specificationpublic CompletableFuture<Void> createTaskManagerPod(KubernetesPod kubernetesPod)
FlinkKubeClientcreateTaskManagerPod 在接口中 FlinkKubeClientkubernetesPod - taskmanager podpublic CompletableFuture<Void> stopPod(String podName)
FlinkKubeClientstopPod 在接口中 FlinkKubeClientpodName - pod namepublic Optional<Endpoint> getRestEndpoint(String clusterId)
FlinkKubeClientgetRestEndpoint 在接口中 FlinkKubeClientclusterId - cluster idpublic List<KubernetesPod> getPodsWithLabels(Map<String,String> labels)
FlinkKubeClientgetPodsWithLabels 在接口中 FlinkKubeClientlabels - labels to filter the podspublic void stopAndCleanupCluster(String clusterId)
FlinkKubeClientstopAndCleanupCluster 在接口中 FlinkKubeClientclusterId - cluster idpublic void handleException(Exception e)
FlinkKubeClienthandleException 在接口中 FlinkKubeClientpublic Optional<KubernetesService> getRestService(String clusterId)
FlinkKubeClientgetRestService 在接口中 FlinkKubeClientclusterId - cluster idpublic KubernetesWatch watchPodsAndDoCallback(Map<String,String> labels, FlinkKubeClient.PodCallbackHandler podCallbackHandler)
FlinkKubeClientFlinkKubeClient.PodCallbackHandler.watchPodsAndDoCallback 在接口中 FlinkKubeClientlabels - labels to filter the pods to watchpodCallbackHandler - podCallbackHandler which reacts to pod eventspublic void close()
close 在接口中 AutoCloseableCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.