hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [1/2] hadoop git commit: HDFS-11849. JournalNode startup failure exception should be logged in log file. Contributed By Surendra Singh Lilhore.
Date Wed, 24 May 2017 15:48:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 94a80974d -> 462c6fb5b


HDFS-11849. JournalNode startup failure exception should be logged in log file. Contributed
By Surendra Singh Lilhore.

(cherry picked from commit 9cab42cc797986081fef184748044f1790a4f039)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a7f06357
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a7f06357
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a7f06357

Branch: refs/heads/branch-2.8
Commit: a7f063576cbb557176f64b2b1ae816f54876144f
Parents: 94a8097
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Tue May 23 02:39:19 2017 +0800
Committer: Brahma Reddy Battula <brahma@apache.org>
Committed: Wed May 24 23:45:57 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/qjournal/server/JournalNode.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a7f06357/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
index 39a8034..5caccf7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/server/JournalNode.java
@@ -17,6 +17,8 @@
  */
 package org.apache.hadoop.hdfs.qjournal.server;
 
+import static org.apache.hadoop.util.ExitUtil.terminate;
+
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOException;
@@ -307,7 +309,12 @@ public class JournalNode implements Tool, Configurable, JournalNodeMXBean
{
 
   public static void main(String[] args) throws Exception {
     StringUtils.startupShutdownMessage(JournalNode.class, args, LOG);
-    System.exit(ToolRunner.run(new JournalNode(), args));
+    try {
+      System.exit(ToolRunner.run(new JournalNode(), args));
+    } catch (Throwable e) {
+      LOG.error("Failed to start journalnode.", e);
+      terminate(-1, e);
+    }
   }
 
   public void discardSegments(String journalId, long startTxId)


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message