Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D514A200B3C for ; Wed, 13 Jul 2016 19:52:48 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D39E5160A6A; Wed, 13 Jul 2016 17:52:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 295D4160A62 for ; Wed, 13 Jul 2016 19:52:48 +0200 (CEST) Received: (qmail 46195 invoked by uid 500); 13 Jul 2016 17:52:47 -0000 Mailing-List: contact commits-help@tez.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tez.apache.org Delivered-To: mailing list commits@tez.apache.org Received: (qmail 46185 invoked by uid 99); 13 Jul 2016 17:52:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2016 17:52:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3E0A2E04BE; Wed, 13 Jul 2016 17:52:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hitesh@apache.org To: commits@tez.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: tez git commit: TEZ-3337. Do not log empty fields of TaskAttemptFinishedEvent to avoid confusion. (Zhiyuan Yang via hitesh) Date: Wed, 13 Jul 2016 17:52:47 +0000 (UTC) archived-at: Wed, 13 Jul 2016 17:52:49 -0000 Repository: tez Updated Branches: refs/heads/master 91279010b -> e6be19695 TEZ-3337. Do not log empty fields of TaskAttemptFinishedEvent to avoid confusion. (Zhiyuan Yang via hitesh) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/e6be1969 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/e6be1969 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/e6be1969 Branch: refs/heads/master Commit: e6be196951307057dc8561441996445232edfa24 Parents: 9127901 Author: Hitesh Shah Authored: Wed Jul 13 10:52:29 2016 -0700 Committer: Hitesh Shah Committed: Wed Jul 13 10:52:29 2016 -0700 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../events/TaskAttemptFinishedEvent.java | 12 +++++------ .../TestHistoryEventsProtoConversion.java | 22 ++++++++++++++++++++ 3 files changed, 30 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/e6be1969/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 9aab833..ff57f62 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-3337. Do not log empty fields of TaskAttemptFinishedEvent to avoid confusion. TEZ-3303. Have ShuffleVertexManager consume more precise partition stats. TEZ-1248. Reduce slow-start should special case 1 reducer runs. TEZ-3327. ATS Parser: Populate config details available in dag. @@ -80,6 +81,7 @@ INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-3337. Do not log empty fields of TaskAttemptFinishedEvent to avoid confusion. TEZ-1248. Reduce slow-start should special case 1 reducer runs. Release 0.8.4: 2016-07-08 http://git-wip-us.apache.org/repos/asf/tez/blob/e6be1969/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java ---------------------------------------------------------------------- diff --git a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java index 5a9d8c9..e9100e8 100644 --- a/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java +++ b/tez-dag/src/main/java/org/apache/tez/dag/history/events/TaskAttemptFinishedEvent.java @@ -256,12 +256,12 @@ public class TaskAttemptFinishedEvent implements HistoryEvent { + ", finishTime=" + finishTime + ", timeTaken=" + (finishTime - startTime) + ", status=" + state.name() - + ", taskFailureType=" + taskFailureType - + ", errorEnum=" + (error != null ? error.name() : "") - + ", diagnostics=" + diagnostics - + ", containerId=" + (containerId != null ? containerId.toString() : "") - + ", nodeId=" + (nodeId != null ? nodeId.toString() : "") - + ", nodeHttpAddress=" + (nodeHttpAddress != null ? nodeHttpAddress : "") + + (taskFailureType != null ? ", taskFailureType=" + taskFailureType : "") + + (error != null ? ", errorEnum=" + error.name() : "") + + (diagnostics != null ? ", diagnostics=" + diagnostics : "") + + (containerId != null ? ", containerId=" + containerId.toString() : "") + + (nodeId != null ? ", nodeId=" + nodeId.toString() : "") + + (nodeHttpAddress != null ? ", nodeHttpAddress=" + nodeHttpAddress : "") + counterStr; } http://git-wip-us.apache.org/repos/asf/tez/blob/e6be1969/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java ---------------------------------------------------------------------- diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java index 7d3faf9..67a927e 100644 --- a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java +++ b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java @@ -18,6 +18,7 @@ package org.apache.tez.dag.history.events; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.fail; import java.nio.ByteBuffer; @@ -622,6 +623,27 @@ public class TestHistoryEventsProtoConversion { Assert.assertEquals(event.getTaskFailureType(), deserializedEvent.getTaskFailureType()); logEvents(event, deserializedEvent); } + { + // toString shouldn't include null fields + TezTaskAttemptID taId = + TezTaskAttemptID.getInstance(TezTaskID.getInstance(TezVertexID.getInstance( + TezDAGID.getInstance(ApplicationId.newInstance(0, 1), 1), 111), 0), 0); + long timestamp = 1024L; + List events = Lists.newArrayList(); + events.add(new DataEventDependencyInfo(timestamp, taId)); + events.add(new DataEventDependencyInfo(timestamp, taId)); + TaskAttemptFinishedEvent event = new TaskAttemptFinishedEvent( + TezTaskAttemptID.getInstance(TezTaskID.getInstance(TezVertexID.getInstance( + TezDAGID.getInstance(ApplicationId.newInstance(0, 1), 1), 111), 1), 1), + "vertex1", 10001l, 1000434444l, TaskAttemptState.SUCCEEDED, null, null, + null, new TezCounters(), events, null, 0, null, 0, null, null, null, null, null); + String eventStr = event.toString(); + String[] items = new String[] {"taskFailureType", "errorEnum", "diagnostics", "containerId", + "nodeId", "nodeHttpAddress"}; + for (String item : items) { + assertFalse(eventStr.contains(item)); + } + } } @SuppressWarnings("deprecation")