You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2020/02/03 13:00:43 UTC
[flink] branch release-1.10 updated: [FLINK-15797][k8s] Reduce log
noise of Fabric8FlinkKubeClient
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.10 by this push:
new 7441850 [FLINK-15797][k8s] Reduce log noise of Fabric8FlinkKubeClient
7441850 is described below
commit 7441850efef62387fb28c80835ea9c48a5933c52
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Wed Jan 29 18:01:33 2020 +0100
[FLINK-15797][k8s] Reduce log noise of Fabric8FlinkKubeClient
This commit reduces the log noise of the Fabric8FlinkKubeClient by changing the log level
from info to debug.
This closes #10965.
---
.../kubernetes/kubeclient/Fabric8FlinkKubeClient.java | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java b/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
index 74df4c4..dd71e32 100644
--- a/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
+++ b/flink-kubernetes/src/main/java/org/apache/flink/kubernetes/kubeclient/Fabric8FlinkKubeClient.java
@@ -123,7 +123,7 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
configMap = c.decorate(configMap);
}
- LOG.info("Create config map with data size {}", configMap.getInternalResource().getData().size());
+ LOG.debug("Create config map with data size {}", configMap.getInternalResource().getData().size());
this.internalClient.configMaps().create(configMap.getInternalResource());
}
@@ -146,7 +146,8 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
}
deployment = new FlinkMasterDeploymentDecorator(clusterSpecification).decorate(deployment);
- LOG.info("Create Flink Master deployment with spec: {}", deployment.getInternalResource().getSpec());
+
+ LOG.debug("Create Flink Master deployment with spec: {}", deployment.getInternalResource().getSpec());
this.internalClient
.apps()
@@ -164,7 +165,8 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
}
pod = new TaskManagerPodDecorator(parameter).decorate(pod);
- LOG.info("Create TaskManager pod with spec: {}", pod.getInternalResource().getSpec().toString());
+
+ LOG.debug("Create TaskManager pod with spec: {}", pod.getInternalResource().getSpec());
this.internalClient.pods().inNamespace(this.nameSpace).create(pod.getInternalResource());
}
@@ -234,7 +236,7 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
@Override
public void handleException(Exception e) {
- LOG.error("Encounter Kubernetes Exception.", e);
+ LOG.error("A Kubernetes exception occurred.", e);
}
@Override
@@ -254,7 +256,7 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
final Watcher<Pod> watcher = new Watcher<Pod>() {
@Override
public void eventReceived(Action action, Pod pod) {
- LOG.info("Received {} event for pod {}, details: {}", action, pod.getMetadata().getName(), pod.getStatus());
+ LOG.debug("Received {} event for pod {}, details: {}", action, pod.getMetadata().getName(), pod.getStatus());
switch (action) {
case ADDED:
callbackHandler.onAdded(Collections.singletonList(new KubernetesPod(flinkConfig, pod)));
@@ -269,14 +271,14 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
callbackHandler.onDeleted(Collections.singletonList(new KubernetesPod(flinkConfig, pod)));
break;
default:
- LOG.info("Skip handling {} event for pod {}", action, pod.getMetadata().getName());
+ LOG.debug("Ignore handling {} event for pod {}", action, pod.getMetadata().getName());
break;
}
}
@Override
public void onClose(KubernetesClientException e) {
- LOG.error("Pods watcher onClose", e);
+ LOG.error("The pods watcher is closing.", e);
}
};
this.internalClient.pods().withLabels(labels).watch(watcher);
@@ -295,7 +297,7 @@ public class Fabric8FlinkKubeClient implements FlinkKubeClient {
kubernetesService = d.decorate(kubernetesService);
}
- LOG.info("Create service with spec: {}", kubernetesService.getInternalResource().getSpec());
+ LOG.debug("Create service {} with spec: {}", serviceName, kubernetesService.getInternalResource().getSpec());
this.internalClient.services().create(kubernetesService.getInternalResource());