You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2014/01/20 11:56:38 UTC
git commit: AMBARI-4344 STORM: Update configs with -Xmx prefix.
(Denys Buzhor via atkach)
Updated Branches:
refs/heads/trunk e2c9a64e5 -> 9d92a192f
AMBARI-4344 STORM: Update configs with -Xmx prefix. (Denys Buzhor via atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d92a192
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d92a192
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d92a192
Branch: refs/heads/trunk
Commit: 9d92a192f29060bad18b0f244c38d5fe3e1d67df
Parents: e2c9a64
Author: atkach <at...@hortonworks.com>
Authored: Mon Jan 20 12:56:34 2014 +0200
Committer: atkach <at...@hortonworks.com>
Committed: Mon Jan 20 12:56:34 2014 +0200
----------------------------------------------------------------------
ambari-web/app/data/HDP2/site_properties.js | 13 +++++
ambari-web/app/data/service_configs.js | 4 ++
.../storm_defaults_provider.js | 61 ++++++++++++++++++++
.../validators/storm_configs_validator.js | 57 ++++++++++++++++++
4 files changed, 135 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d92a192/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index d74ab3d..ddf0219 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -1359,6 +1359,19 @@ module.exports =
"defaultValue": "A1",
"displayType": "string"
},
+ {
+ "id": "site property",
+ "description": "",
+ "isReconfigurable": true,
+ "isVisible": true,
+ "isRequiredByAgent": true,
+ "serviceName": "STORM",
+ "category": "Advanced",
+ "displayName": "worker.childopts",
+ "name": "worker.childopts",
+ "defaultValue": "-Xmx768m",
+ "displayType": "string"
+ },
/**********************************************webhcat-site***************************************/
{
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d92a192/ambari-web/app/data/service_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/service_configs.js b/ambari-web/app/data/service_configs.js
index af6c4f4..0a8a6cb 100644
--- a/ambari-web/app/data/service_configs.js
+++ b/ambari-web/app/data/service_configs.js
@@ -19,8 +19,10 @@
var App = require('app');
require('models/service_config');
require('utils/configs/defaults_providers/yarn_defaults_provider');
+require('utils/configs/defaults_providers/storm_defaults_provider');
require('utils/configs/validators/yarn_configs_validator');
require('utils/configs/validators/mapreduce2_configs_validator');
+require('utils/configs/validators/storm_configs_validator');
module.exports = [
{
@@ -229,6 +231,8 @@ module.exports = [
{
serviceName: 'STORM',
displayName: 'Storm',
+ configsValidator: App.STORMConfigsValidator,
+ defaultsProviders: [App.STORMDefaultsProvider],
filename: 'storm-site',
configCategories: [
App.ServiceConfigCategory.create({ name: 'Nimbus', displayName : 'Nimbus'}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d92a192/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js b/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
new file mode 100644
index 0000000..196defd
--- /dev/null
+++ b/ambari-web/app/utils/configs/defaults_providers/storm_defaults_provider.js
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+var App = require('app');
+require('utils/configs/defaults_providers/defaultsProvider');
+
+App.STORMDefaultsProvider = App.DefaultsProvider.create({
+
+ clusterData: null,
+
+ /**
+ * List of the configs that should be calculated
+ */
+ configsTemplate: {
+ 'supervisor.childopts': null,
+ 'nimbus.childopts': null,
+ 'drpc.childopts': null,
+ 'ui.childopts': null,
+ 'logviewer.childopts': null,
+ 'worker.childopts': null
+ },
+
+ // @todo fill with correct values
+ getDefaults: function (localDB) {
+ this._super();
+ this.getClusterData(localDB);
+ var configs = {};
+ jQuery.extend(configs, this.get('configsTemplate'));
+ if (!this.clusterDataIsValid()) {
+ return configs;
+ }
+ configs['supervisor.childopts'] = '-Xmx256m';
+ configs['nimbus.childopts'] = '-Xmx1024m';
+ configs['drpc.childopts'] = '-Xmx768m';
+ configs['ui.childopts'] = '-Xmx768m';
+ configs['logviewer.childopts'] = '-Xmx128m';
+ configs['worker.childopts'] = '-Xmx768m';
+ return configs;
+ },
+
+ /**
+ * Verify <code>clusterData</code> - check if all properties are defined
+ */
+ clusterDataIsValid: function () {
+ return true;
+ }
+});
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d92a192/ambari-web/app/utils/configs/validators/storm_configs_validator.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/configs/validators/storm_configs_validator.js b/ambari-web/app/utils/configs/validators/storm_configs_validator.js
new file mode 100644
index 0000000..69fe18b
--- /dev/null
+++ b/ambari-web/app/utils/configs/validators/storm_configs_validator.js
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+var App = require('app');
+require('utils/configs/validators/service_configs_validator');
+
+App.STORMConfigsValidator = App.ServiceConfigsValidator.create({
+ /**
+ * List of the configs that should be validated
+ */
+ configValidators: {
+ 'supervisor.childopts': 'supervisorChildOpts',
+ 'nimbus.childopts': 'nimbusChildOpts',
+ 'drpc.childopts': 'drpcChildOpts',
+ 'ui.childopts': 'uiChildOpts',
+ 'logviewer.childopts': 'logviewerChildOpts',
+ 'worker.childopts': 'workerChildOpts'
+ },
+
+ supervisorChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ nimbusChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ drpcChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ uiChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ logviewerChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ },
+
+ workerChildOpts: function(config) {
+ return this.validateXmxValue(config);
+ }
+});