HDFS-208. name node should warn if only one dir is listed in dfs.name.dir. Contributed by Uma Maheswara Rao G
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1204119 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
84f0c0f180
commit
0e5c1a45bf
|
@ -121,6 +121,9 @@ Release 0.23.1 - UNRELEASED
|
|||
|
||||
HDFS-2563. Some cleanup in BPOfferService. (todd)
|
||||
|
||||
HDFS-208. name node should warn if only one dir is listed in dfs.name.dir.
|
||||
(Uma Maheswara Rao G via eli)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-2130. Switch default checksum to CRC32C. (todd)
|
||||
|
|
|
@ -306,7 +306,20 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|||
* @throws IOException if loading fails
|
||||
*/
|
||||
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);
|
||||
|
||||
long loadStart = now();
|
||||
|
|
Loading…
Reference in New Issue