To run HDFS, you need to desinate one machine as a namenode. In this case the property fs.defaultFS is an HDFS filesystem URI whose host is the namenode's hostname or IP address and whose port is the port that the namenode will listen on for RPCs. If no port is specified, the default of 8020 is used.

There are a few other configuration properties you should set for HDFS:  those that set the storage directories for the namenode and for datanodes. The property dfs.namenode.name.dir specifies a list of directories where the namenode stores persistent filesystem metadata. A copy of each metadata file is stored in each directory for redundancy.

as for dfs.datanode.data.diir property, which specifies a list of directories for a datanode to store its blocks in. Unlike the namenode, a datanode round-robins writes between its storage directories, so for performance you should specify a storage directory for each local disk. Read performance also benefits from having multiple disks for storage.

The dfs.namenode.checkpoint.dir property specifies a list of directories where the checkpoints are kept. Like the storage directories for the namenode, whick keep redundant copies of the namenode metadata. the checkpointed filesystem image is stored in each checkpoint directory for redundancy.

Below is summary of the important configuration properties for HDFS

Property name Type Default value Description
fs.defaultFS URI file/// The default filesystem. The URI defines the hostname and port that the namenode's RPC server runs on. The default port is 8020. this property is set in core-site.xml
dfs.namenode.name.dir Comma-separated directory names file//$(hadoop.tmp.dir}/dfs/name The list of directories where the namenode and stores its persistent metadata. The namenode stores a copy of the metadatain each directory in the list.
dfs.datanode.data.dir Comma-separated directory names file//$(hadoop.tmp.dir}/dfs/data A list of directories where the datanode stores blocks. Each block is stored in only one of these directories.
dfs.namenode.checkpoint.dir Comma-separated directory names file://${hadoop.tmp.dir/dfs/namesecondary A list of directories where the secondary namenode stores checkpoinnts. It stores a copy of the checkpoint in each directory in the list.