HBASE-5488 OfflineMetaRepair doesn't support hadoop 0.20's fs.default.name property (gaojinchao)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1325625 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea687c181d
commit
3976ec641e
|
@ -66,7 +66,10 @@ public class OfflineMetaRepair {
|
||||||
|
|
||||||
// create a fsck object
|
// create a fsck object
|
||||||
Configuration conf = HBaseConfiguration.create();
|
Configuration conf = HBaseConfiguration.create();
|
||||||
|
// Cover both bases, the old way of setting default fs and the new.
|
||||||
|
// We're supposed to run on 0.20 and 0.21 anyways.
|
||||||
conf.set("fs.defaultFS", conf.get(HConstants.HBASE_DIR));
|
conf.set("fs.defaultFS", conf.get(HConstants.HBASE_DIR));
|
||||||
|
conf.set("fs.default.name", conf.get(HConstants.HBASE_DIR));
|
||||||
HBaseFsck fsck = new HBaseFsck(conf);
|
HBaseFsck fsck = new HBaseFsck(conf);
|
||||||
boolean fixHoles = false;
|
boolean fixHoles = false;
|
||||||
|
|
||||||
|
@ -81,6 +84,7 @@ public class OfflineMetaRepair {
|
||||||
String path = args[i];
|
String path = args[i];
|
||||||
conf.set(HConstants.HBASE_DIR, path);
|
conf.set(HConstants.HBASE_DIR, path);
|
||||||
conf.set("fs.defaultFS", conf.get(HConstants.HBASE_DIR));
|
conf.set("fs.defaultFS", conf.get(HConstants.HBASE_DIR));
|
||||||
|
conf.set("fs.default.name", conf.get(HConstants.HBASE_DIR));
|
||||||
} else if (cmd.equals("-fixHoles")) {
|
} else if (cmd.equals("-fixHoles")) {
|
||||||
fixHoles = true;
|
fixHoles = true;
|
||||||
} else if (cmd.equals("-fix")) {
|
} else if (cmd.equals("-fix")) {
|
||||||
|
|
Loading…
Reference in New Issue