public interface FlinkKubeClient extends AutoCloseable
createTaskManagerPod(KubernetesPod), stopPod(String) should be implemented asynchronously.| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
FlinkKubeClient.PodCallbackHandler
Callback handler for kubernetes pods.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
closevoid createJobManagerComponent(KubernetesJobManagerSpecification kubernetesJMSpec)
kubernetesJMSpec - jobmanager specificationCompletableFuture<Void> createTaskManagerPod(KubernetesPod kubernetesPod)
kubernetesPod - taskmanager podCompletableFuture<Void> stopPod(String podName)
podName - pod namevoid stopAndCleanupCluster(String clusterId)
clusterId - cluster idOptional<KubernetesService> getRestService(String clusterId)
clusterId - cluster idOptional<Endpoint> getRestEndpoint(String clusterId)
clusterId - cluster idList<KubernetesPod> getPodsWithLabels(Map<String,String> labels)
labels - labels to filter the podsvoid handleException(Exception e)
KubernetesWatch watchPodsAndDoCallback(Map<String,String> labels, FlinkKubeClient.PodCallbackHandler podCallbackHandler)
FlinkKubeClient.PodCallbackHandler.labels - labels to filter the pods to watchpodCallbackHandler - podCallbackHandler which reacts to pod eventsCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.