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 2016/12/14 10:51:43 UTC
[1/2] ambari git commit: AMBARI-19190 Remove UI logic to set or
expect hive_server_interactive_host. (atkach)
Repository: ambari
Updated Branches:
refs/heads/trunk a7a53896a -> bc3c23a23
AMBARI-19190 Remove UI logic to set or expect hive_server_interactive_host. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c3669229
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c3669229
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c3669229
Branch: refs/heads/trunk
Commit: c3669229ff0f6da6e8a96e239607a0782a5d2c75
Parents: a7a5389
Author: Andrii Tkach <at...@apache.org>
Authored: Tue Dec 13 20:20:50 2016 +0200
Committer: Andrii Tkach <at...@apache.org>
Committed: Wed Dec 14 12:24:46 2016 +0200
----------------------------------------------------------------------
.../app/controllers/main/service/info/configs.js | 15 ---------------
.../wizard/step7/assign_master_controller.js | 11 -----------
ambari-web/app/models/configs/theme/config_action.js | 6 +-----
.../wizard/step7/assign_master_controller_test.js | 14 +-------------
4 files changed, 2 insertions(+), 44 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/app/controllers/main/service/info/configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js
index 94caf4a..b5538e0 100644
--- a/ambari-web/app/controllers/main/service/info/configs.js
+++ b/ambari-web/app/controllers/main/service/info/configs.js
@@ -607,21 +607,6 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi
serviceConfig.get('configs').push(App.ServiceConfigProperty.create(hProperty));
}
}, this);
-
- App.ConfigAction.find().forEach(function(item){
- var hostComponentConfig = item.get('hostComponentConfig');
- var config = serviceConfig.get('configs').filterProperty('filename', hostComponentConfig.fileName).findProperty('name', hostComponentConfig.configName);
- if (config){
- var componentHostName = App.HostComponent.find().findProperty('componentName', item.get('componentName')) ;
- if (componentHostName) {
- var setConfigValue = !config.get('value');
- if (setConfigValue) {
- config.set('value', componentHostName.get('hostName'));
- config.set('recommendedValue', componentHostName.get('hostName'));
- }
- }
- }
- }, this);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
index 1ee0c45..81c80e1 100644
--- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
+++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js
@@ -399,19 +399,8 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
self.clearComponentsToBeDeleted(configActionComponent.componentName);
}
- var hostComponentConfig = context.get('config.configAction.hostComponentConfig');
- var serviceConfigs = context.get('controller.stepConfigs').findProperty('serviceName', context.get('config.serviceName')).get('configs');
- var config = serviceConfigs.filterProperty('filename', hostComponentConfig.fileName).findProperty('name', hostComponentConfig.configName);
- var oldValue = config.get('value');
- config.set('value', componentHostName);
- config.set('recommendedValue', componentHostName);
configActionComponent.hostName = componentHostName;
self.get('configWidgetContext.config').set('configActionComponent', configActionComponent);
- context.get('controller').loadConfigRecommendations([{
- "type": App.config.getConfigTagFromFileName(config.get('filename')),
- "name": config.get('name'),
- "old_value": oldValue
- }])
});
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/app/models/configs/theme/config_action.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/theme/config_action.js b/ambari-web/app/models/configs/theme/config_action.js
index 9ac4e7a..905fecb 100644
--- a/ambari-web/app/models/configs/theme/config_action.js
+++ b/ambari-web/app/models/configs/theme/config_action.js
@@ -63,11 +63,7 @@ App.ConfigAction.FIXTURES = [
file_name: "hive-interactive-env.xml",
if:'${hive-interactive-env/enable_hive_interactive}',
then:'add',
- else: 'delete',
- host_component_config: {
- configName: "hive_server_interactive_host",
- fileName: "hive-interactive-env.xml"
- }
+ else: 'delete'
},
{
id: 2,
http://git-wip-us.apache.org/repos/asf/ambari/blob/c3669229/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js b/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
index 053b900..7705fb0 100644
--- a/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
+++ b/ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js
@@ -325,8 +325,7 @@ describe('App.AssignMasterOnStep7Controller', function () {
mock = {
saveMasterComponentHosts: Em.K,
loadMasterComponentHosts: Em.K,
- setDBProperty: Em.K,
- loadConfigRecommendations: Em.K
+ setDBProperty: Em.K
},
config = Em.Object.create({
filename: 'file1',
@@ -339,7 +338,6 @@ describe('App.AssignMasterOnStep7Controller', function () {
sinon.stub(mock, 'saveMasterComponentHosts');
sinon.stub(mock, 'loadMasterComponentHosts');
sinon.stub(mock, 'setDBProperty');
- sinon.stub(mock, 'loadConfigRecommendations');
view.reopen({
content: Em.Object.create({
controllerName: 'ctrl1',
@@ -388,7 +386,6 @@ describe('App.AssignMasterOnStep7Controller', function () {
mock.saveMasterComponentHosts.restore();
mock.loadMasterComponentHosts.restore();
mock.setDBProperty.restore();
- mock.loadConfigRecommendations.restore();
});
it("saveMasterComponentHosts should be called", function() {
@@ -405,14 +402,5 @@ describe('App.AssignMasterOnStep7Controller', function () {
hostName: 'host1'
});
});
-
- it("config should be set", function() {
- expect(config.get('value')).to.be.equal('host1');
- expect(config.get('recommendedValue')).to.be.equal('host1');
- });
-
- it("config should be set (loadConfigRecommendations is called once)", function() {
- expect(mock.loadConfigRecommendations.calledOnce).to.be.true;
- });
});
});
\ No newline at end of file
[2/2] ambari git commit: AMBARI-19184 Remove HSI host name from UI.
(smohanty via atkach)
Posted by at...@apache.org.
AMBARI-19184 Remove HSI host name from UI. (smohanty via atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bc3c23a2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bc3c23a2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bc3c23a2
Branch: refs/heads/trunk
Commit: bc3c23a23aadd59971c6e14fe6cdf5990ac71a45
Parents: c366922
Author: Andrii Tkach <at...@apache.org>
Authored: Wed Dec 14 12:51:04 2016 +0200
Committer: Andrii Tkach <at...@apache.org>
Committed: Wed Dec 14 12:51:04 2016 +0200
----------------------------------------------------------------------
.../HIVE/configuration/hive-interactive-env.xml | 10 ------
.../HDP/2.5/services/HIVE/themes/theme.json | 30 +----------------
.../stacks/HDP/2.5/services/stack_advisor.py | 16 ++-------
.../stacks/2.5/common/test_stack_advisor.py | 34 +++-----------------
.../test/python/stacks/2.5/configs/hsi_ha.json | 1 -
5 files changed, 8 insertions(+), 83 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
index 7b20728..a1f6d22 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
@@ -43,16 +43,6 @@
<on-ambari-upgrade add="true"/>
</property>
<property>
- <name>hive_server_interactive_host</name>
- <value>localhost</value>
- <description>The host that has been assigned to run HiveServer2 Interactive</description>
- <display-name>HiveServer2 Interactive Host</display-name>
- <value-attributes>
- <overridable>false</overridable>
- </value-attributes>
- <on-ambari-upgrade add="true"/>
- </property>
- <property>
<name>num_llap_nodes</name>
<value>1</value>
<description>The number of Hive LLAP daemons to run.</description>
http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json
index 1d50b6a..9caf51e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/themes/theme.json
@@ -19,28 +19,6 @@
"subsection-name": "interactive-query-row1-col1"
},
{
- "config": "hive-interactive-env/hive_server_interactive_host",
- "subsection-name": "interactive-query-row1-col1",
- "depends-on": [
- {
- "configs":[
- "hive-interactive-env/enable_hive_interactive"
- ],
- "if": "${hive-interactive-env/enable_hive_interactive}",
- "then": {
- "property_value_attributes": {
- "visible": true
- }
- },
- "else": {
- "property_value_attributes": {
- "visible": false
- }
- }
- }
- ]
- },
- {
"config": "hive-interactive-site/hive.llap.daemon.queue.name",
"subsection-name": "interactive-query-row1-col1",
"depends-on": [
@@ -206,12 +184,6 @@
}
},
{
- "config": "hive-interactive-env/hive_server_interactive_host",
- "widget": {
- "type": "label"
- }
- },
- {
"config": "hive-interactive-site/hive.llap.daemon.queue.name",
"widget": {
"type": "combo"
@@ -274,4 +246,4 @@
}
]
}
-}
\ No newline at end of file
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 60c1cac..50f7b7f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -387,17 +387,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
validationItems.append({"config-name": "enable_hive_interactive",
"item": self.getErrorItem(
"HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.")})
- if 'hive_server_interactive_host' in hive_site_env_properties:
- hsi_host = hsi_hosts[0]
- if hive_site_env_properties['hive_server_interactive_host'].lower() != hsi_host.lower():
- validationItems.append({"config-name": "hive_server_interactive_host",
- "item": self.getErrorItem(
- "HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.")})
- pass
- if 'hive_server_interactive_host' not in hive_site_env_properties:
- validationItems.append({"config-name": "hive_server_interactive_host",
- "item": self.getErrorItem(
- "HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.")})
pass
else:
@@ -700,7 +689,6 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
if len(hsi_hosts) > 0:
hsi_host = hsi_hosts[0]
putHiveInteractiveEnvProperty('enable_hive_interactive', 'true')
- putHiveInteractiveEnvProperty('hive_server_interactive_host', hsi_host)
# Update 'hive.llap.daemon.queue.name' property attributes if capacity scheduler is changed.
if self.HIVE_INTERACTIVE_SITE in services['configurations']:
@@ -1092,8 +1080,8 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
hive_server_interactive_heapsize = None
hive_server_interactive_hosts = self.getHostsWithComponent("HIVE", "HIVE_SERVER_INTERACTIVE", services, hosts)
if hive_server_interactive_hosts is None:
- # If its None, read the base service HDFS's DATANODE node memory, as are host are considered homogenous.
- hive_server_interactive_hosts = self.getHostsWithComponent("HDFS", "DATANODE", services, hosts)
+ # If its None, read the base service YARN's NODEMANAGER node memory, as are host are considered homogenous.
+ hive_server_interactive_hosts = self.getHostsWithComponent("YARN", "NODEMANAGER", services, hosts)
if hive_server_interactive_hosts is not None and len(hive_server_interactive_hosts) > 0:
host_mem = long(hive_server_interactive_hosts[0]["Hosts"]["total_mem"])
hive_server_interactive_heapsize = min(max(2048.0, 400.0*llap_concurrency), 3.0/8 * host_mem)
http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
index 54fe42a..a7ccdfe 100644
--- a/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
+++ b/ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py
@@ -445,13 +445,12 @@ class TestHDP25StackAdvisor(TestCase):
def test_validateYarnConfigurations(self):
properties = {'enable_hive_interactive': 'true',
- 'hive_server_interactive_host': 'c6401.ambari.apache.org',
'hive.tez.container.size': '2048', "yarn.nodemanager.linux-container-executor.group": "hadoop"}
recommendedDefaults = {'enable_hive_interactive': 'true',
- "hive_server_interactive_host": "c6401.ambari.apache.org", "yarn.nodemanager.linux-container-executor.group": "hadoop"}
+ "yarn.nodemanager.linux-container-executor.group": "hadoop"}
configurations = {
"hive-interactive-env": {
- "properties": {'enable_hive_interactive': 'true', "hive_server_interactive_host": "c6401.ambari.apache.org"}
+ "properties": {'enable_hive_interactive': 'true'}
},
"hive-site": {
"properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'}
@@ -479,13 +478,11 @@ class TestHDP25StackAdvisor(TestCase):
def test_validateHiveInteractiveEnvConfigurations(self):
properties = {'enable_hive_interactive': 'true',
- 'hive_server_interactive_host': 'c6401.ambari.apache.org',
'hive.tez.container.size': '2048'}
- recommendedDefaults = {'enable_hive_interactive': 'true',
- "hive_server_interactive_host": "c6401.ambari.apache.org"}
+ recommendedDefaults = {'enable_hive_interactive': 'true'}
configurations = {
"hive-interactive-env": {
- "properties": {'enable_hive_interactive': 'true', 'hive_server_interactive_host': 'c6401.ambari.apache.org'}
+ "properties": {'enable_hive_interactive': 'true'}
},
"hive-site": {
"properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'}
@@ -511,20 +508,6 @@ class TestHDP25StackAdvisor(TestCase):
"properties": {"yarn.resourcemanager.work-preserving-recovery.enabled": "true"}
}
}
- configurations3 = {
- "hive-interactive-env": {
- "properties": {'enable_hive_interactive': 'true', "hive_server_interactive_host": "c6402.ambari.apache.org"}
- },
- "hive-site": {
- "properties": {"hive.security.authorization.enabled": "true", 'hive.tez.java.opts': '-server -Djava.net.preferIPv4Stack=true'}
- },
- "hive-env": {
- "properties": {"hive_security_authorization": "None"}
- },
- "yarn-site": {
- "properties": {"yarn.resourcemanager.work-preserving-recovery.enabled": "true"}
- }
- }
services = self.load_json("services-normal-his-valid.json")
res_expected = [
@@ -534,17 +517,10 @@ class TestHDP25StackAdvisor(TestCase):
self.assertEquals(res, res_expected)
res_expected = [
- {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.', 'type': 'configuration', 'config-name': 'enable_hive_interactive', 'level': 'ERROR'},
- {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.', 'type': 'configuration', 'config-name': 'hive_server_interactive_host', 'level': 'ERROR'}
+ {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires enable_hive_interactive in hive-interactive-env set to true.', 'type': 'configuration', 'config-name': 'enable_hive_interactive', 'level': 'ERROR'}
]
res = self.stackAdvisor.validateHiveInteractiveEnvConfigurations(properties, recommendedDefaults, configurations2, services, {})
self.assertEquals(res, res_expected)
-
- res_expected = [
- {'config-type': 'hive-interactive-env', 'message': 'HIVE_SERVER_INTERACTIVE requires hive_server_interactive_host in hive-interactive-env set to its host name.', 'type': 'configuration', 'config-name': 'hive_server_interactive_host', 'level': 'ERROR'}
- ]
- res = self.stackAdvisor.validateHiveInteractiveEnvConfigurations(properties, recommendedDefaults, configurations3, services, {})
- self.assertEquals(res, res_expected)
pass
http://git-wip-us.apache.org/repos/asf/ambari/blob/bc3c23a2/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json b/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json
index 7f95a35..def0e54 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/hsi_ha.json
@@ -416,7 +416,6 @@
"hive-interactive-env": {
"content" : "con\ntent",
"enable_hive_interactive" : "true",
- "hive_server_interactive_host" : "c6401.ambari.apache.org",
"llap_queue_capacity" : "0",
"num_llap_nodes" : "1",
"num_retries_for_checking_llap_status" : 2,