From 9b37593ad64c59f28ea3a6db52b657c914a6dd4e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 19 Feb 2008 19:38:37 +0000 Subject: [PATCH] HBASE-79 When HBase needs to be migrated, it should display a message on stdout, not just in the logs git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@629203 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/java/org/apache/hadoop/hbase/master/HMaster.java | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 75e11c550ac..42b36256b86 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -57,6 +57,8 @@ Hbase Change Log HBASE-444 hbase is very slow at determining table is not present HBASE-438 XMLOutputter state should be initialized. HBASE-414 Move client classes into client package + HBASE-79 When HBase needs to be migrated, it should display a message on + stdout, not just in the logs Branch 0.1 diff --git a/src/java/org/apache/hadoop/hbase/master/HMaster.java b/src/java/org/apache/hadoop/hbase/master/HMaster.java index eb5f7715318..2501d3b29ba 100644 --- a/src/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/src/java/org/apache/hadoop/hbase/master/HMaster.java @@ -273,8 +273,13 @@ public class HMaster extends Thread implements HConstants, HMasterInterface, fs.mkdirs(rootdir); FSUtils.setVersion(fs, rootdir); } else if (!FSUtils.checkVersion(fs, rootdir)) { - throw new IOException("File system needs upgrade. Run " + - "the '${HBASE_HOME}/bin/hbase migrate' script"); + // Output on stdout so user sees it in terminal. + String message = "The HBase data files stored on the FileSystem are " + + "from an earlier version of HBase. You need to run " + + "'${HBASE_HOME}/bin/hbase migrate' to bring your installation + + "up-to-date."; + System.out.println("WARNING! " + message + " Master shutting down..."); + throw new IOException(message); } if (!fs.exists(rootRegionDir)) {