Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change 
notification.

The "UnixShellScriptProgrammingGuide" page has been changed by SomeOtherAccount:
https://wiki.apache.org/hadoop/UnixShellScriptProgrammingGuide?action=diff&rev1=17&rev2=18

  
   * Avoid adding more globals or project specific globals and/or entries in 
*-env.sh and/or a comment at the bottom here.  In a lot of cases, there is 
pre-existing functionality that already does what you might need to do.  
Additionally, every configuration option makes it that much harder for end 
users. If you do need to add a new global variable for additional 
functionality, start it with HADOOP_ for common, HDFS_ for HDFS, YARN_ for 
YARN, and MAPRED_ for MapReduce.  It should be documented in either *-env.sh 
(for user overridable parts) or hadoop-functions.sh (for internal-only 
globals). This helps prevents our variables from clobbering other people.
  
-  * Remember that abc_xyz_OPTS can and should act as a catch-all for Java 
daemon options.  Custom heap environment variables add unnecessary complexity 
for both the user and us.  They should be avoided.
+  * Remember that abc_xyz_OPTS can and should act as a catch-all for Java 
daemon options.  Custom heap environment variables and other custom daemon 
variables add unnecessary complexity for both the user and us.  They should be 
avoided.  In almost every case, it is better to have a global and apply it to 
all daemons to have a universal default.  Users can/will override that 
variables as necessary in their init scripts.  This also helps cover the case 
when functionality starts in one chunk of Hadoop but ends up in multiple places.
  
   * Avoid mutli-level `if`'s where the comparisons are static strings.  Use 
case statements instead, as they are easier to read.
  

Reply via email to