Return-Path: X-Original-To: apmail-tez-commits-archive@minotaur.apache.org Delivered-To: apmail-tez-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6BD651103D for ; Tue, 26 Aug 2014 04:18:36 +0000 (UTC) Received: (qmail 17767 invoked by uid 500); 26 Aug 2014 04:18:36 -0000 Delivered-To: apmail-tez-commits-archive@tez.apache.org Received: (qmail 17728 invoked by uid 500); 26 Aug 2014 04:18:36 -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 17719 invoked by uid 99); 26 Aug 2014 04:18:35 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Aug 2014 04:18:35 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 69AC49CEDD4; Tue, 26 Aug 2014 04:18:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jeagles@apache.org To: commits@tez.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: git commit: TEZ-1490. dagid reported is incorrect in TezClient.java (jeagles) Date: Tue, 26 Aug 2014 04:18:35 +0000 (UTC) Repository: tez Updated Branches: refs/heads/master 5ae13686b -> f7151e194 TEZ-1490. dagid reported is incorrect in TezClient.java (jeagles) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/f7151e19 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/f7151e19 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/f7151e19 Branch: refs/heads/master Commit: f7151e1946908ad037069332f2e78e111e17ef64 Parents: 5ae1368 Author: Jonathan Eagles Authored: Mon Aug 25 23:18:25 2014 -0500 Committer: Jonathan Eagles Committed: Mon Aug 25 23:18:25 2014 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../java/org/apache/tez/client/TezClient.java | 29 +++++++++++++------- 2 files changed, 20 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/f7151e19/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 786a21e..2a21995 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -91,6 +91,7 @@ INCOMPATIBLE CHANGES TEZ-1472. Separate method calls for creating InputDataInformationEvent with serialized/unserialized payloads TEZ-1485. Disable node blacklisting and ATS in AM for local mode + TEZ-1490. dagid reported is incorrect in TezClient.java Release 0.4.0-incubating: 2014-04-05 http://git-wip-us.apache.org/repos/asf/tez/blob/f7151e19/tez-api/src/main/java/org/apache/tez/client/TezClient.java ---------------------------------------------------------------------- diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClient.java b/tez-api/src/main/java/org/apache/tez/client/TezClient.java index 4b1f221..cd753eb 100644 --- a/tez-api/src/main/java/org/apache/tez/client/TezClient.java +++ b/tez-api/src/main/java/org/apache/tez/client/TezClient.java @@ -717,25 +717,34 @@ public class TezClient { // DO NOT CHANGE THIS. This code is replicated from TezDAGID.java private static final char SEPARATOR = '_'; - private static final String DAG = "dag"; - private static final ThreadLocal idFormat = new ThreadLocal() { + public static final String DAG = "dag"; + static final ThreadLocal tezAppIdFormat = new ThreadLocal() { @Override public NumberFormat initialValue() { NumberFormat fmt = NumberFormat.getInstance(); fmt.setGroupingUsed(false); - fmt.setMinimumIntegerDigits(6); + fmt.setMinimumIntegerDigits(4); + return fmt; + } + }; + + static final ThreadLocal tezDagIdFormat = new ThreadLocal() { + @Override + public NumberFormat initialValue() { + NumberFormat fmt = NumberFormat.getInstance(); + fmt.setGroupingUsed(false); + fmt.setMinimumIntegerDigits(1); return fmt; } }; // Used only for MapReduce compatibility code - private static String getDefaultTezDAGID(ApplicationId appId) { + private static String getDefaultTezDAGID(ApplicationId applicationId) { return (new StringBuilder(DAG)).append(SEPARATOR). - append(appId.getClusterTimestamp()). - append(SEPARATOR). - append(appId.getId()). - append(SEPARATOR). - append(idFormat.get().format(1)).toString(); + append(applicationId.getClusterTimestamp()). + append(SEPARATOR). + append(tezAppIdFormat.get().format(applicationId.getId())). + append(SEPARATOR). + append(tezDagIdFormat.get().format(1)).toString(); } - }