Details

Description

NameNode#initializeGenericKeys exits early if neither a nameservice nor NN ID is passed. However, this method also serves to set fs.defaultFS in the configuration object stored by the NN to the NN RPC address after generic keys have been configured. This should be done in all cases.

Your NameNode would not start in a non-HA, non-Federated environment unless the values of fs.defaultFS and dfs.namenode.rpc-address were the same in the NN conf. I encountered this because I wanted to test ViewFS in a non-federated cluster and I wanted the fs.defaultFS to be viewfs://...

Aaron T. Myers
added a comment - 03/May/12 03:56 Patch looks good. +1. Nice job, Aaron "De Morgan" Myers.
Conjunctions and disjunctions are my jam.
What was the user-visible impact of this, if any?
Your NameNode would not start in a non-HA, non-Federated environment unless the values of fs.defaultFS and dfs.namenode.rpc-address were the same in the NN conf. I encountered this because I wanted to test ViewFS in a non-federated cluster and I wanted the fs.defaultFS to be viewfs://...
I'm going to commit this momentarily.

Aaron T. Myers
added a comment - 02/May/12 22:47 Here's a patch which addresses the bug. Configuration keys will still only be initialized if either HA or federation is enabled in the conf, but fs.defaultFS will always be set regardless.