Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getDefaults: function (localDB) {
this._super();
this.getClusterData(localDB);
var configs = {};
jQuery.extend(configs, this.get('configsTemplate'));
if (!this.clusterDataIsValid()) {
return configs;
}
configs['yarn.nodemanager.resource.memory-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
configs['yarn.scheduler.minimum-allocation-mb'] = Math.round(this.get('ramPerContainer'));
configs['yarn.scheduler.maximum-allocation-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
configs['yarn.app.mapreduce.am.resource.mb'] = Math.round(this.get('amMemory'));
configs['yarn.app.mapreduce.am.command-opts'] = "-Xmx" + Math.round(0.8 * this.get('amMemory')) + "m";
configs['mapreduce.map.memory.mb'] = Math.round(this.get('mapMemory'));
configs['mapreduce.reduce.memory.mb'] = Math.round(this.get('reduceMemory'));
configs['mapreduce.map.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('mapMemory')) + "m";
configs['mapreduce.reduce.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('reduceMemory')) + "m";
configs['mapreduce.task.io.sort.mb'] = Math.round(0.4 * this.get('mapMemory'));
return configs;
},
getDefaults: function (localDB) {
this._super();
this.getClusterData(localDB);
var configs = {};
jQuery.extend(configs, this.get('configsTemplate'));
if (!this.clusterDataIsValid()) {
return configs;
}
configs['yarn.nodemanager.resource.memory-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
configs['yarn.scheduler.minimum-allocation-mb'] = Math.floor(this.get('ramPerContainer'));
configs['yarn.scheduler.maximum-allocation-mb'] = Math.round(this.get('containers') * this.get('ramPerContainer'));
configs['yarn.app.mapreduce.am.resource.mb'] = Math.floor(this.get('amMemory'));
configs['yarn.app.mapreduce.am.command-opts'] = "-Xmx" + Math.round(0.8 * this.get('amMemory')) + "m";
configs['mapreduce.map.memory.mb'] = Math.floor(this.get('mapMemory'));
configs['mapreduce.reduce.memory.mb'] = Math.floor(this.get('reduceMemory'));
configs['mapreduce.map.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('mapMemory')) + "m";
configs['mapreduce.reduce.java.opts'] = "-Xmx" + Math.round(0.8 * this.get('reduceMemory')) + "m";
configs['mapreduce.task.io.sort.mb'] = Math.round(Math.min(0.4 * this.get('mapMemory'), 1024));
return configs;
},