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 0791D10FAC for ; Thu, 4 Dec 2014 01:29:24 +0000 (UTC) Received: (qmail 3451 invoked by uid 500); 4 Dec 2014 01:29:23 -0000 Delivered-To: apmail-tez-commits-archive@tez.apache.org Received: (qmail 3412 invoked by uid 500); 4 Dec 2014 01:29:23 -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 3403 invoked by uid 99); 4 Dec 2014 01:29:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2014 01:29:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 826B682B2B3; Thu, 4 Dec 2014 01:29:23 +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: <3a43a96cb0894ab4b0289fdde5bf2dc0@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: tez git commit: TEZ-1818. Problem loading tez-api-version-info.properties in case current context classloader in not pointing to Tez jars. (Johannes Zillmann via hitesh) Date: Thu, 4 Dec 2014 01:29:23 +0000 (UTC) Repository: tez Updated Branches: refs/heads/master 87b4c6b40 -> 991d3d384 TEZ-1818. Problem loading tez-api-version-info.properties in case current context classloader in not pointing to Tez jars. (Johannes Zillmann via hitesh) Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/991d3d38 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/991d3d38 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/991d3d38 Branch: refs/heads/master Commit: 991d3d3849119b4b667636a829dc5125d74623a3 Parents: 87b4c6b Author: Hitesh Shah Authored: Wed Dec 3 17:28:51 2014 -0800 Committer: Hitesh Shah Committed: Wed Dec 3 17:28:51 2014 -0800 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../main/java/org/apache/tez/common/VersionInfo.java | 12 +++++------- 2 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/991d3d38/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1348ab0..5cae713 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -45,6 +45,8 @@ ALL CHANGES: TEZ-1774. AppLaunched event for Timeline does not have start time set. TEZ-1780. tez-api is missing jersey dependencies. TEZ-1796. Use of DeprecationDelta broke build against 2.2 Hadoop. + TEZ-1818. Problem loading tez-api-version-info.properties in case current context classloader + in not pointing to Tez jars. Release 0.5.2: 2014-11-07 http://git-wip-us.apache.org/repos/asf/tez/blob/991d3d38/tez-api/src/main/java/org/apache/tez/common/VersionInfo.java ---------------------------------------------------------------------- diff --git a/tez-api/src/main/java/org/apache/tez/common/VersionInfo.java b/tez-api/src/main/java/org/apache/tez/common/VersionInfo.java index 0287d0b..b5e44c9 100644 --- a/tez-api/src/main/java/org/apache/tez/common/VersionInfo.java +++ b/tez-api/src/main/java/org/apache/tez/common/VersionInfo.java @@ -47,18 +47,16 @@ public class VersionInfo { protected VersionInfo(String component) { this.component = component; info = new Properties(); - String versionInfoFile = component + "-version-info.properties"; + String versionInfoFile = "/" + component + "-version-info.properties"; InputStream is = null; try { - is = Thread.currentThread().getContextClassLoader() - .getResourceAsStream(versionInfoFile); + is = this.getClass().getResourceAsStream(versionInfoFile); if (is == null) { - throw new IOException("Resource not found"); + throw new IOException("Resource not found: " + versionInfoFile); } info.load(is); } catch (IOException ex) { - LogFactory.getLog(getClass()).warn("Could not read '" + - versionInfoFile + "', " + ex.toString(), ex); + LOG.warn("Could not read '" + versionInfoFile + "', " + ex.toString(), ex); } finally { IOUtils.closeStream(is); } @@ -86,7 +84,7 @@ public class VersionInfo { + ", version=" + getVersion() + ", revision=" + getRevision() + ", SCM-URL=" + getSCMURL() - + ", buildTIme=" + getBuildTime() + + ", buildTime=" + getBuildTime() + " ]"; }