hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1505602 - /hbase/branches/0.89-fb/bin/rolling_restart_v2
Date Mon, 22 Jul 2013 04:59:38 GMT
Author: liyin
Date: Mon Jul 22 04:59:38 2013
New Revision: 1505602

URL: http://svn.apache.org/r1505602
Log:
[HBASE-8467] Logging Failed nodes list to a new file every time, plus a small bug fix

Author: rshroff

Summary:
Currently, the list of servers for which the rolling restart failed was
logged only to a static file 'rolling_restart_failed_nodes'. It becomes
difficult to track the failures in case of multiple rolling_restarts.

Appending a time stamp to fix the issue.

Test Plan: Tried out on titanshadow025-ash3

Reviewers: aaiyer, manukranthk

Reviewed By: manukranthk

CC: arjen, hbase-eng@

Differential Revision: https://phabricator.fb.com/D893216

Modified:
    hbase/branches/0.89-fb/bin/rolling_restart_v2

Modified: hbase/branches/0.89-fb/bin/rolling_restart_v2
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/bin/rolling_restart_v2?rev=1505602&r1=1505601&r2=1505602&view=diff
==============================================================================
--- hbase/branches/0.89-fb/bin/rolling_restart_v2 (original)
+++ hbase/branches/0.89-fb/bin/rolling_restart_v2 Mon Jul 22 04:59:38 2013
@@ -138,19 +138,24 @@ if (cmd.hasOption("n")) {
 conf = HBaseConfiguration.create();
 admin = new HBaseAdmin(conf);
 
-PrintWriter errFileWriter = new PrintWriter(logsFolder + "/rolling_restart_failed_nodes");
+String failedNodesFileName = logsFolder + "/rolling_restart_failed_nodes_" +
+  conf.get("titan.cell.name") + "_" + System.currentTimeMillis();
+
+PrintWriter errFileWriter = new PrintWriter(failedNodesFileName);
+
+println "Please check " + failedNodesFileName + " for list of failed servers.";
 
 if (hosts != null) {
   for (String server in hosts) {
-    HServerAddress serverAddr = new HServerAddress(server, 60020);
     try {
+      HServerAddress serverAddr = new HServerAddress(server, 60020);
       HServerInfo host = 
         admin.getConnection().getHRegionConnection(serverAddr).getHServerInfo();
       restartRegionServer(admin, host, conf, rollingRestartArgs, logsFolder, verifyRSRestart);
     } catch (Exception e) {
       e.printStackTrace();
       println "\nERROR: "+ server + " Failed.";
-      errFileWriter.println(host.getHostname());
+      errFileWriter.println(server);
     }
   }
 } else {



Mime
View raw message