The previous chapter was devoted to setting up a Hadoop cluster. In this chapter, we look at the procedures to keep a cluster running smoothly.
As an administrator, it is invaluable to have a basic understanding of how the components of HDFS—the namenode, the secondary namenode, and the datanodes—organize their persistent data on disk. Knowing which files are which can help you diagnose problems or spot that something is awry.
A newly formatted namenode creates the following directory structure:
Recall from Chapter 9 that the
is a list of directories, with the same contents mirrored in each
directory. This mechanism provides resilience, particularly if one of
the directories is an NFS mount, as is recommended.
The VERSION file is a Java properties file that contains information about the version of HDFS that is running. Here are the contents of a typical file:
#Tue Mar 10 19:21:36 GMT 2009 namespaceID=134368441 cTime=0 storageType=NAME_NODE layoutVersion=-18
layoutVersion is a negative integer that defines the version of HDFS’s persistent data structures. This version number has no relation to the release number of the Hadoop distribution. Whenever the layout changes, the version number is decremented (for example, the version after −18 is −19). When this happens, HDFS needs ...