HBASE-11726 Master should fail-safe if starting with a pre 0.96 layout (Esteban Guiterrez)
This commit is contained in:
parent
e5a5e968f1
commit
2cd45eb9a0
|
@ -492,9 +492,6 @@ public abstract class FSUtils {
|
||||||
} finally {
|
} finally {
|
||||||
dis.close();
|
dis.close();
|
||||||
}
|
}
|
||||||
// Update the format
|
|
||||||
LOG.info("Updating the hbase.version file format with version=" + version);
|
|
||||||
setVersion(fs, rootdir, version, 0, HConstants.DEFAULT_VERSION_FILE_WRITE_ATTEMPTS);
|
|
||||||
}
|
}
|
||||||
} catch (EOFException eof) {
|
} catch (EOFException eof) {
|
||||||
LOG.warn("Version file was empty, odd, will try to set it.");
|
LOG.warn("Version file was empty, odd, will try to set it.");
|
||||||
|
@ -580,9 +577,10 @@ public abstract class FSUtils {
|
||||||
// version is deprecated require migration
|
// version is deprecated require migration
|
||||||
// Output on stdout so user sees it in terminal.
|
// Output on stdout so user sees it in terminal.
|
||||||
String msg = "HBase file layout needs to be upgraded."
|
String msg = "HBase file layout needs to be upgraded."
|
||||||
+ " You have version " + version
|
+ " You have version " + version
|
||||||
+ " and I want version " + HConstants.FILE_SYSTEM_VERSION
|
+ " and I want version " + HConstants.FILE_SYSTEM_VERSION
|
||||||
+ ". Is your hbase.rootdir valid? If so, you may need to run "
|
+ ". Consult http://hbase.apache.org/book.html for further information about upgrading HBase."
|
||||||
|
+ " Is your hbase.rootdir valid? If so, you may need to run "
|
||||||
+ "'hbase hbck -fixVersionFile'.";
|
+ "'hbase hbck -fixVersionFile'.";
|
||||||
if (message) {
|
if (message) {
|
||||||
System.out.println("WARNING! " + msg);
|
System.out.println("WARNING! " + msg);
|
||||||
|
|
Loading…
Reference in New Issue