hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bra...@apache.org
Subject [1/4] hadoop git commit: HDFS-11849. JournalNode startup failure exception should be logged in log file. Contributed By Surendra Singh Lilhore.
Date Mon, 22 May 2017 18:54:35 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 275525574 -> ec2468ced
  refs/heads/branch-2.7 8a0e5e3b7 -> cecedcf55
  refs/heads/branch-2.8.1 6c93dabea -> c7a0fb571
  refs/heads/trunk 2a8fcf0c9 -> 9cab42cc7


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


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

Branch: refs/heads/trunk
Commit: 9cab42cc797986081fef184748044f1790a4f039
Parents: 2a8fcf0
Author: Brahma Reddy Battula <brahma@apache.org>
Authored: Tue May 23 02:39:19 2017 +0800
Committer: Brahma Reddy Battula <brahma@apache.org>
Committed: Tue May 23 02:39:19 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/9cab42cc/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 ab724d5..6056e34 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;
@@ -330,7 +332,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 doPreUpgrade(String journalId) throws IOException {


---------------------------------------------------------------------
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