HDFS-208. Merge r1204119 from trunk to 0.23
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1298231 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9aa829fe67
commit
985eb07407
|
@ -373,6 +373,9 @@ Release 0.23.1 - 2012-02-17
|
||||||
HDFS-2786. Fix host-based token incompatibilities in DFSUtil. (Kihwal
|
HDFS-2786. Fix host-based token incompatibilities in DFSUtil. (Kihwal
|
||||||
Lee via jitendra)
|
Lee via jitendra)
|
||||||
|
|
||||||
|
HDFS-208. name node should warn if only one dir is listed in dfs.name.dir.
|
||||||
|
(Uma Maheswara Rao G via eli)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-2130. Switch default checksum to CRC32C. (todd)
|
HDFS-2130. Switch default checksum to CRC32C. (todd)
|
||||||
|
|
|
@ -310,7 +310,20 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
||||||
* @throws IOException if loading fails
|
* @throws IOException if loading fails
|
||||||
*/
|
*/
|
||||||
public static FSNamesystem loadFromDisk(Configuration conf) throws IOException {
|
public static FSNamesystem loadFromDisk(Configuration conf) throws IOException {
|
||||||
FSImage fsImage = new FSImage(conf);
|
Collection<URI> namespaceDirs = FSNamesystem.getNamespaceDirs(conf);
|
||||||
|
Collection<URI> namespaceEditsDirs =
|
||||||
|
FSNamesystem.getNamespaceEditsDirs(conf);
|
||||||
|
|
||||||
|
if (namespaceDirs.size() == 1) {
|
||||||
|
LOG.warn("Only one " + DFS_NAMENODE_NAME_DIR_KEY
|
||||||
|
+ " directory configured , beware data loss!");
|
||||||
|
}
|
||||||
|
if (namespaceEditsDirs.size() == 1) {
|
||||||
|
LOG.warn("Only one " + DFS_NAMENODE_EDITS_DIR_KEY
|
||||||
|
+ " directory configured , beware data loss!");
|
||||||
|
}
|
||||||
|
|
||||||
|
FSImage fsImage = new FSImage(conf, namespaceDirs, namespaceEditsDirs);
|
||||||
FSNamesystem namesystem = new FSNamesystem(conf, fsImage);
|
FSNamesystem namesystem = new FSNamesystem(conf, fsImage);
|
||||||
|
|
||||||
long loadStart = now();
|
long loadStart = now();
|
||||||
|
|
Loading…
Reference in New Issue