[FLINK-5493] Fix String formats in FlinkDistributionOverlay and Task

Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/82a6b83e
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/82a6b83e
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/82a6b83e

Branch: refs/heads/release-1.2
Commit: 82a6b83ec4c1660dfe97fd299ac3169e5c10088b
Parents: 64c4c9d
Author: Boris Osipov <boris_osi...@epam.com>
Authored: Thu Dec 15 12:10:26 2016 +0300
Committer: zentol <ches...@apache.org>
Committed: Thu Jan 19 23:59:12 2017 +0100

----------------------------------------------------------------------
 .../clusterframework/overlays/FlinkDistributionOverlay.java    | 6 +++---
 .../main/java/org/apache/flink/runtime/taskmanager/Task.java   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/82a6b83e/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/overlays/FlinkDistributionOverlay.java
----------------------------------------------------------------------
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/overlays/FlinkDistributionOverlay.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/overlays/FlinkDistributionOverlay.java
index a36cc67..0655554 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/overlays/FlinkDistributionOverlay.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/overlays/FlinkDistributionOverlay.java
@@ -99,21 +99,21 @@ public class FlinkDistributionOverlay extends 
AbstractContainerOverlay {
                                flinkBinPath = new 
File(System.getenv(ENV_FLINK_BIN_DIR));
                        }
                        else {
-                               throw new 
IllegalStateException(String.format("the {} environment variable must be set", 
ENV_FLINK_BIN_DIR));
+                               throw new 
IllegalStateException(String.format("the %s environment variable must be set", 
ENV_FLINK_BIN_DIR));
                        }
 
                        if(env.containsKey(ENV_FLINK_CONF_DIR)) {
                                flinkConfPath = new 
File(System.getenv(ENV_FLINK_CONF_DIR));
                        }
                        else {
-                               throw new 
IllegalStateException(String.format("the {} environment variable must be set", 
ENV_FLINK_CONF_DIR));
+                               throw new 
IllegalStateException(String.format("the %s environment variable must be set", 
ENV_FLINK_CONF_DIR));
                        }
 
                        if(env.containsKey(ENV_FLINK_LIB_DIR)) {
                                flinkLibPath = new 
File(System.getenv(ENV_FLINK_LIB_DIR));
                        }
                        else {
-                               throw new 
IllegalStateException(String.format("the {} environment variable must be set", 
ENV_FLINK_LIB_DIR));
+                               throw new 
IllegalStateException(String.format("the %s environment variable must be set", 
ENV_FLINK_LIB_DIR));
                        }
 
                        return this;

http://git-wip-us.apache.org/repos/asf/flink/blob/82a6b83e/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
----------------------------------------------------------------------
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java 
b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
index a1fb35e..e945b93 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/Task.java
@@ -705,7 +705,7 @@ public class Task implements Runnable, TaskActions {
                                                else {
                                                        if 
(transitionState(current, ExecutionState.FAILED, t)) {
                                                                // proper 
failure of the task. record the exception as the root cause
-                                                               String 
errorMessage = String.format("Execution of {} ({}) failed.", 
taskNameWithSubtask, executionId);
+                                                               String 
errorMessage = String.format("Execution of %s (%s) failed.", 
taskNameWithSubtask, executionId);
                                                                failureCause = 
t;
                                                                
cancelInvokable();
 
@@ -1062,7 +1062,7 @@ public class Task implements Runnable, TaskActions {
                                                        resultPartitionId,
                                                        ExecutionState.RUNNING);
                                        } else if (throwable instanceof 
PartitionProducerDisposedException) {
-                                               String msg = 
String.format("Producer {} of partition {} disposed. Cancelling execution.",
+                                               String msg = 
String.format("Producer %s of partition %s disposed. Cancelling execution.",
                                                        
resultPartitionId.getProducerId(), resultPartitionId.getPartitionId());
                                                LOG.info(msg, throwable);
                                                cancelExecution();

Reply via email to