Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-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 ED0CB18AB8 for ; Mon, 9 Nov 2015 09:49:46 +0000 (UTC) Received: (qmail 26939 invoked by uid 500); 9 Nov 2015 09:49:46 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 26877 invoked by uid 500); 9 Nov 2015 09:49:46 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 26107 invoked by uid 99); 9 Nov 2015 09:49:45 -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; Mon, 09 Nov 2015 09:49:45 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9E4D4E02FF; Mon, 9 Nov 2015 09:49:45 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Date: Mon, 09 Nov 2015 09:50:07 -0000 Message-Id: <48108001e41841758b1c7a0f7bfe647a@git.apache.org> In-Reply-To: <1c1f1d05ec054e519b8494b886c23fcb@git.apache.org> References: <1c1f1d05ec054e519b8494b886c23fcb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [24/49] ignite git commit: ignite-1153: improve stop node message ignite-1153: improve stop node message Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/51c0d805 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/51c0d805 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/51c0d805 Branch: refs/heads/ignite-1537 Commit: 51c0d8055157fedf20a28d206598c7c4c514a7f1 Parents: 2501c3a Author: kcheng.mvp Authored: Wed Nov 4 12:20:46 2015 +0300 Committer: Denis Magda Committed: Wed Nov 4 12:20:46 2015 +0300 ---------------------------------------------------------------------- .../java/org/apache/ignite/internal/IgniteKernal.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/51c0d805/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java index 5a0fe16..0277acc 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java @@ -641,7 +641,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Catch generic throwable to secure against user assertions. catch (Throwable e) { U.error(log, "Failed to notify lifecycle bean (safely ignored) [evt=" + evt + - ", gridName=" + gridName + ']', e); + (gridName == null ? "" : ", gridName=" + gridName) + ']', e); if (e instanceof Error) throw (Error)e; @@ -1673,7 +1673,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { ">>> CPU(s): " + locNode.metrics().getTotalCpus() + NL + ">>> Heap: " + U.heapSize(locNode, 2) + "GB" + NL + ">>> VM name: " + rtBean.getName() + NL + - ">>> Grid name: " + gridName + NL + + (gridName == null ? "" : ">>> Grid name: " + gridName + NL) + ">>> Local node [" + "ID=" + locNode.id().toString().toUpperCase() + ", order=" + locNode.order() + ", clientMode=" + ctx.clientNode() + @@ -1939,11 +1939,13 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { // Ack stop. if (log.isQuiet()) { + String nodeName = gridName == null ? "" : "name=" + gridName + ", "; + if (!errOnStop) - U.quiet(false, "Ignite node stopped OK [uptime=" + + U.quiet(false, "Ignite node stopped OK [" + nodeName + "uptime=" + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + ']'); else - U.quiet(true, "Ignite node stopped wih ERRORS [uptime=" + + U.quiet(true, "Ignite node stopped wih ERRORS [" + nodeName + "uptime=" + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + ']'); } @@ -1958,7 +1960,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { ">>> " + dash + NL + ">>> " + ack + NL + ">>> " + dash + NL + - ">>> Grid name: " + gridName + NL + + (gridName == null ? "" : ">>> Grid name: " + gridName + NL) + ">>> Grid uptime: " + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + NL + NL); @@ -1972,7 +1974,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable { log.info(NL + NL + ">>> " + ack + NL + ">>> " + dash + NL + - ">>> Grid name: " + gridName + NL + + (gridName == null ? "" : ">>> Grid name: " + gridName + NL) + ">>> Grid uptime: " + X.timeSpan2HMSM(U.currentTimeMillis() - startTime) + NL + ">>> See log above for detailed error message." + NL +