Re: Convention question for using DFSConfigKey constants : are zeros magic?

2013-04-23 Thread Aaron T. Myers
On Fri, Apr 19, 2013 at 3:40 PM, Jay Vyas jayunit...@gmail.com wrote: The more generic question is wether or not there is enforcement of naming conventions or commenting for special values in numeric configuration parameters: I'm interpretting your answer as No...? There's certainly no

Convention question for using DFSConfigKey constants : are zeros magic?

2013-04-19 Thread Jay Vyas
I recently looked into the HDFS source tree to determine idioms with respect to a hairy debate about the threshold between what is and is not a magic number, and found that : And it appears that the number zero is NOT considered magic - at least not in the HDFS source code. I found that that

Re: Convention question for using DFSConfigKey constants : are zeros magic?

2013-04-19 Thread Jay Vyas
Thanks ! okay that helps to clarify things. Okay, so the value in referencing the static comment is that it is commented in the DFS_KEYS file, and declared as 0. Having the ==0 in code defines this default behaviour implicitly, so a change to the code would make that code inconsistent with the