TEZ-3939. Remove performance hit of precondition check in AM for register running...
authorJason Lowe <jlowe@apache.org>
Thu, 24 May 2018 14:09:36 +0000 (09:09 -0500)
committerJason Lowe <jlowe@apache.org>
Thu, 24 May 2018 14:09:36 +0000 (09:09 -0500)
tez-dag/src/main/java/org/apache/tez/dag/app/TezTaskCommunicatorImpl.java

index 9b700f8..d52df4f 100644 (file)
@@ -221,9 +221,8 @@ public class TezTaskCommunicatorImpl extends TaskCommunicator {
                                          int priority) {
 
     ContainerInfo containerInfo = registeredContainers.get(containerId);
-    Preconditions.checkNotNull(containerInfo,
-        "Cannot register task attempt: " + taskSpec.getTaskAttemptID() + " to unknown container: " +
-            containerId);
+    Preconditions.checkNotNull(containerInfo, "Cannot register task attempt %s to unknown container %s",
+        taskSpec.getTaskAttemptID(), containerId);
     synchronized (containerInfo) {
       if (containerInfo.taskSpec != null) {
         throw new TezUncheckedException(