SHARE
TWEET

Untitled

a guest Dec 11th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     @augeas { '/etc/hadoop/conf/mapred-site.xml':
  2.       lens => 'xml.lns',
  3.       incl => '/etc/hadoop/conf/mapred-site.xml',
  4.       changes => [
  5.   "set configuration/property[name/#text = 'mapreduce.map.java.opts']/name/#text mapreduce.map.java.opts",
  6.   "set configuration/property[name/#text = 'mapreduce.map.java.opts']/value/#text -Xmx${mapmem}m",
  7.  
  8.   "set configuration/property[name/#text = 'mapreduce.reduce.java.opts']/name/#text mapreduce.reduce.java.opts",
  9.   "set configuration/property[name/#text = 'mapreduce.reduce.java.opts']/value/#text -Xmx${reducemem}m",
  10.  
  11.   "set configuration/property[name/#text = 'mapreduce.job.maps']/name/#text mapreduce.job.maps",
  12.   "set configuration/property[name/#text = 'mapreduce.job.maps']/value/#text ${maps}",
  13.  
  14.   "set configuration/property[name/#text = 'mapreduce.map.memory.mb']/name/#text mapreduce.map.memory.mb",
  15.   "set configuration/property[name/#text = 'mapreduce.map.memory.mb']/value/#text ${mapmem}",
  16.  
  17.   "set configuration/property[name/#text = 'mapreduce.job.reduces']/name/#text mapreduce.job.reduces",
  18.   "set configuration/property[name/#text = 'mapreduce.job.reduces']/value/#text ${reduces}",
  19.  
  20.   "set configuration/property[name/#text = 'yarn.app.mapreduce.am.command-opts']/name/#text yarn.app.mapreduce.am.command-opts",
  21.   "set configuration/property[name/#text = 'yarn.app.mapreduce.am.command-opts']/value/#text -Xmx${reducemem}m",
  22.  
  23.   "set configuration/property[name/#text = 'yarn.app.mapreduce.am.command-opts']/name/#text yarn.app.mapreduce.am.command-opts",
  24.   "set configuration/property[name/#text = 'yarn.app.mapreduce.am.command-opts']/value/#text -Xmx${reducemem}m",
  25.  
  26.   "set configuration/property[name/#text = 'mapreduce.reduce.memory.mb']/name/#text mapreduce.reduce.memory.mb",
  27.   "set configuration/property[name/#text = 'mapreduce.reduce.memory.mb']/value/#text ${reducemem}",
  28.  
  29.   # handy bit of template for search/replace the key and values
  30.   #"set configuration/property[name/#text = 'K']/name/#text K",
  31.   #"set configuration/property[name/#text = 'K']/value/#text V",
  32.       ],
  33.     }
  34.     Augeas<| title == '/etc/hadoop/conf/mapred-site.xml' |>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top