HBASE-5680 Improve compatibility warning about HBase with Hadoop 0.23.x

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1310429 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2012-04-06 16:03:42 +00:00
parent ccc24e39f9
commit 4317892dce
1 changed files with 11 additions and 1 deletions

View File

@ -357,7 +357,17 @@ Server {
loop(); loop();
} }
} catch (Throwable t) { } catch (Throwable t) {
abort("Unhandled exception. Starting shutdown.", t); // HBASE-5680: Likely hadoop23 vs hadoop 20.x/1.x incompatibility
if (t instanceof NoClassDefFoundError &&
t.getMessage().contains("org/apache/hadoop/hdfs/protocol/FSConstants$SafeModeAction")) {
// improved error message for this special case
abort("HBase is having a problem with its Hadoop jars. You may need to "
+ "recompile HBase against Hadoop version "
+ org.apache.hadoop.util.VersionInfo.getVersion()
+ " or change your hadoop jars to start properly", t);
} else {
abort("Unhandled exception. Starting shutdown.", t);
}
} finally { } finally {
startupStatus.cleanup(); startupStatus.cleanup();