ambari git commit: AMBARI-11848. It is not possible to upgrade cluster after upgrade canceling (ncole)
Repository: ambari Updated Branches: refs/heads/trunk 9b75f819e -> 012519fa4 AMBARI-11848. It is not possible to upgrade cluster after upgrade canceling (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/012519fa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/012519fa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/012519fa Branch: refs/heads/trunk Commit: 012519fa4187dc5041cde83c248cc83e132ff3f4 Parents: 9b75f81 Author: Nate Cole Authored: Wed Jun 10 14:28:36 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 19:58:50 2015 -0400 -- .../upgrades/FinalizeUpgradeAction.java | 3 +-- .../upgrades/UpgradeActionTest.java | 24 +++- 2 files changed, 24 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/012519fa/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java index f1af7c4..6ede46b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java @@ -266,7 +266,6 @@ public class FinalizeUpgradeAction extends AbstractServerAction { try { Cluster cluster = clusters.getCluster(clusterName); - StackId desiredClusterStackId = cluster.getDesiredStackVersion(); StackId currentClusterStackId = cluster.getCurrentStackVersion(); // this was a cross-stack upgrade, meaning that configurations were @@ -321,7 +320,7 @@ public class FinalizeUpgradeAction extends AbstractServerAction { Set badHosts = new HashSet(); for (String badVersion : badVersions) { List hostVersions = hostVersionDAO.findByClusterStackAndVersion( -clusterName, desiredClusterStackId, badVersion); +clusterName, targetStackId, badVersion); for (HostVersionEntity hostVersion : hostVersions) { badHosts.add(hostVersion.getHostName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/012519fa/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java index 4048635..209f2ba 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java @@ -18,15 +18,16 @@ package org.apache.ambari.server.serveraction.upgrades; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; -import com.google.inject.persist.UnitOfWork; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ServiceComponentNotFoundException; import org.apache.ambari.server.ServiceNotFoundException; @@ -77,6 +78,7 @@ import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.persist.PersistService; +import com.google.inject.persist.UnitOfWork; /** * Tests upgrade-related server side actions @@ -469,6 +471,16 @@ public class UpgradeActionTest { hostRoleCommand.setExecutionCommandWrapper(new ExecutionCommandWrapper(executionCommand)); + +HostVersionDAO dao = m_injector.getInstance(HostVersionDAO.class); + +List hosts = dao.findByClusterStackAndVersion( +"c1", HDP_22_STACK, HDP_2_2_1_0); +assertFalse(hosts.isEmpty()); +for (HostVersionEntity hve : hosts) { + assertFalse(hve.getState() == RepositoryVersionState.INSTALLED); +} + FinalizeUpgradeAction action = m_injector.getInstance(FinalizeUpgradeAction.class); action.setExecutionCommand(executionCommand); action.setHostRoleCommand(hostRoleCommand); @@ -489,6 +501,16 @@ public class UpgradeActionTest { cluster = clusters.getCluster("c1"); configs = cluster.getAllConfigs(); assertEquals(3, configs.size()); + +hosts = dao.findByClusterStac
ambari git commit: AMBARI-11848. It is not possible to upgrade cluster after upgrade canceling (ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.1 83ce96d76 -> a18e7f408 AMBARI-11848. It is not possible to upgrade cluster after upgrade canceling (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a18e7f40 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a18e7f40 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a18e7f40 Branch: refs/heads/branch-2.1 Commit: a18e7f408f93fcdb024b7f2bd9c14770016139e6 Parents: 83ce96d Author: Nate Cole Authored: Wed Jun 10 20:00:37 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 20:00:37 2015 -0400 -- .../upgrades/FinalizeUpgradeAction.java | 3 +-- .../upgrades/UpgradeActionTest.java | 24 +++- 2 files changed, 24 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/a18e7f40/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java index f1af7c4..6ede46b 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java @@ -266,7 +266,6 @@ public class FinalizeUpgradeAction extends AbstractServerAction { try { Cluster cluster = clusters.getCluster(clusterName); - StackId desiredClusterStackId = cluster.getDesiredStackVersion(); StackId currentClusterStackId = cluster.getCurrentStackVersion(); // this was a cross-stack upgrade, meaning that configurations were @@ -321,7 +320,7 @@ public class FinalizeUpgradeAction extends AbstractServerAction { Set badHosts = new HashSet(); for (String badVersion : badVersions) { List hostVersions = hostVersionDAO.findByClusterStackAndVersion( -clusterName, desiredClusterStackId, badVersion); +clusterName, targetStackId, badVersion); for (HostVersionEntity hostVersion : hostVersions) { badHosts.add(hostVersion.getHostName()); http://git-wip-us.apache.org/repos/asf/ambari/blob/a18e7f40/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java index 4048635..209f2ba 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/UpgradeActionTest.java @@ -18,15 +18,16 @@ package org.apache.ambari.server.serveraction.upgrades; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; -import com.google.inject.persist.UnitOfWork; import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.ServiceComponentNotFoundException; import org.apache.ambari.server.ServiceNotFoundException; @@ -77,6 +78,7 @@ import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.google.inject.persist.PersistService; +import com.google.inject.persist.UnitOfWork; /** * Tests upgrade-related server side actions @@ -469,6 +471,16 @@ public class UpgradeActionTest { hostRoleCommand.setExecutionCommandWrapper(new ExecutionCommandWrapper(executionCommand)); + +HostVersionDAO dao = m_injector.getInstance(HostVersionDAO.class); + +List hosts = dao.findByClusterStackAndVersion( +"c1", HDP_22_STACK, HDP_2_2_1_0); +assertFalse(hosts.isEmpty()); +for (HostVersionEntity hve : hosts) { + assertFalse(hve.getState() == RepositoryVersionState.INSTALLED); +} + FinalizeUpgradeAction action = m_injector.getInstance(FinalizeUpgradeAction.class); action.setExecutionCommand(executionCommand); action.setHostRoleCommand(hostRoleCommand); @@ -489,6 +501,16 @@ public class UpgradeActionTest { cluster = clusters.getCluster("c1"); configs = cluster.getAllConfigs(); assertEquals(3, configs.size()); + +hosts = dao.findByC
ambari git commit: AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information. (jaimin)
Repository: ambari Updated Branches: refs/heads/trunk 5ade3e643 -> 9b75f819e AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9b75f819 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9b75f819 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9b75f819 Branch: refs/heads/trunk Commit: 9b75f819e5acd7c46a029bde4f755abd440d501f Parents: 5ade3e6 Author: Jaimin Jetly Authored: Wed Jun 10 14:49:03 2015 -0700 Committer: Jaimin Jetly Committed: Wed Jun 10 14:50:21 2015 -0700 -- .../YARN/2.1.0.2.0/YARN_metrics.json| 10 +- .../assets/data/metrics/HBASE/definition.json | 15 -- .../app/controllers/global/update_controller.js | 23 ++- .../app/mappers/service_metrics_mapper.js | 150 ++- ambari-web/app/messages.js | 1 - ambari-web/app/models/service/hbase.js | 2 - ambari-web/app/models/service/mapreduce2.js | 1 - ambari-web/app/models/service/yarn.js | 1 - .../global/update_controller_test.js| 19 ++- ambari-web/test/mappers/service_mapper_test.js | 104 ++--- 10 files changed, 189 insertions(+), 137 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9b75f819/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json index 92c32d8..9ea1483 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json @@ -1842,11 +1842,6 @@ "pointInTime": true, "temporal": false }, -"metrics/jvm/startTime": { - "metric": "java.lang:type=Runtime.StartTime", - "pointInTime": true, - "temporal": false -}, "metrics/yarn/Queue/$1.replaceAll(\",q(\\d+)=\",\"/\").substring(1)/ActiveApplications": { "metric": "Hadoop:service=ResourceManager,name=QueueMetrics(.+).ActiveApplications", "pointInTime": true, @@ -2533,6 +2528,11 @@ "pointInTime": true, "temporal": false }, +"metrics/runtime/StartTime": { + "metric": "java.lang:type=Runtime.StartTime", + "pointInTime": true, + "temporal": false +}, "metrics/jvm/memHeapCommittedM": { "metric": "Hadoop:service=ResourceManager,name=JvmMetrics.MemHeapCommittedM", "pointInTime": true, http://git-wip-us.apache.org/repos/asf/ambari/blob/9b75f819/ambari-web/app/assets/data/metrics/HBASE/definition.json -- diff --git a/ambari-web/app/assets/data/metrics/HBASE/definition.json b/ambari-web/app/assets/data/metrics/HBASE/definition.json index 3374f2d..6837f7a 100644 --- a/ambari-web/app/assets/data/metrics/HBASE/definition.json +++ b/ambari-web/app/assets/data/metrics/HBASE/definition.json @@ -3916,11 +3916,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.deleteTableNumOps" }, -"ServiceComponentInfo/Revision" : { - "pointInTime" : true, - "temporal" : false, - "name" : "hadoop:service=HBase,name=Info.revision" -}, "metrics/rpc/splitRegionAvgTime" : { "pointInTime" : true, "temporal" : false, @@ -4131,11 +4126,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime" }, -"metrics/hbase/master/revision" : { - "pointInTime" : true, - "temporal" : false, - "name" : "hadoop:service=HBase,name=Info.revision" -}, "metrics/rpc/modifyColumnMaxTime" : { "pointInTime" : true, "temporal" : false, @@ -7279,11 +7269,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime" }, -
ambari git commit: AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information. (jaimin)
Repository: ambari Updated Branches: refs/heads/branch-2.1 96f64f680 -> 83ce96d76 AMBARI-11821. With HBase master HA Ambari sometimes displays incorrect dashboard information. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/83ce96d7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/83ce96d7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/83ce96d7 Branch: refs/heads/branch-2.1 Commit: 83ce96d760d653fd07eef286226ef1a387f7bfaa Parents: 96f64f6 Author: Jaimin Jetly Authored: Wed Jun 10 14:49:03 2015 -0700 Committer: Jaimin Jetly Committed: Wed Jun 10 14:49:03 2015 -0700 -- .../YARN/2.1.0.2.0/YARN_metrics.json| 10 +- .../assets/data/metrics/HBASE/definition.json | 15 -- .../app/controllers/global/update_controller.js | 23 ++- .../app/mappers/service_metrics_mapper.js | 150 ++- ambari-web/app/messages.js | 1 - ambari-web/app/models/service/hbase.js | 2 - ambari-web/app/models/service/mapreduce2.js | 1 - ambari-web/app/models/service/yarn.js | 1 - .../global/update_controller_test.js| 19 ++- ambari-web/test/mappers/service_mapper_test.js | 104 ++--- 10 files changed, 189 insertions(+), 137 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/83ce96d7/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json index 92c32d8..9ea1483 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/YARN_metrics.json @@ -1842,11 +1842,6 @@ "pointInTime": true, "temporal": false }, -"metrics/jvm/startTime": { - "metric": "java.lang:type=Runtime.StartTime", - "pointInTime": true, - "temporal": false -}, "metrics/yarn/Queue/$1.replaceAll(\",q(\\d+)=\",\"/\").substring(1)/ActiveApplications": { "metric": "Hadoop:service=ResourceManager,name=QueueMetrics(.+).ActiveApplications", "pointInTime": true, @@ -2533,6 +2528,11 @@ "pointInTime": true, "temporal": false }, +"metrics/runtime/StartTime": { + "metric": "java.lang:type=Runtime.StartTime", + "pointInTime": true, + "temporal": false +}, "metrics/jvm/memHeapCommittedM": { "metric": "Hadoop:service=ResourceManager,name=JvmMetrics.MemHeapCommittedM", "pointInTime": true, http://git-wip-us.apache.org/repos/asf/ambari/blob/83ce96d7/ambari-web/app/assets/data/metrics/HBASE/definition.json -- diff --git a/ambari-web/app/assets/data/metrics/HBASE/definition.json b/ambari-web/app/assets/data/metrics/HBASE/definition.json index 3374f2d..6837f7a 100644 --- a/ambari-web/app/assets/data/metrics/HBASE/definition.json +++ b/ambari-web/app/assets/data/metrics/HBASE/definition.json @@ -3916,11 +3916,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.deleteTableNumOps" }, -"ServiceComponentInfo/Revision" : { - "pointInTime" : true, - "temporal" : false, - "name" : "hadoop:service=HBase,name=Info.revision" -}, "metrics/rpc/splitRegionAvgTime" : { "pointInTime" : true, "temporal" : false, @@ -4131,11 +4126,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime" }, -"metrics/hbase/master/revision" : { - "pointInTime" : true, - "temporal" : false, - "name" : "hadoop:service=HBase,name=Info.revision" -}, "metrics/rpc/modifyColumnMaxTime" : { "pointInTime" : true, "temporal" : false, @@ -7279,11 +7269,6 @@ "temporal" : false, "name" : "hadoop:service=HBase,name=RPCStatistics.multiMinTime" }, -
ambari git commit: AMBARI-11847: [WinTP2] Skip building hive view on Windows (jluniya)
Repository: ambari Updated Branches: refs/heads/branch-2.1 81dc95fd9 -> 96f64f680 AMBARI-11847: [WinTP2] Skip building hive view on Windows (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/96f64f68 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/96f64f68 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/96f64f68 Branch: refs/heads/branch-2.1 Commit: 96f64f68075ee2da37407dc96dd47f42050ebbef Parents: 81dc95f Author: Jayush Luniya Authored: Wed Jun 10 12:55:11 2015 -0700 Committer: Jayush Luniya Committed: Wed Jun 10 12:56:48 2015 -0700 -- contrib/views/pom.xml | 14 +- pom.xml | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/96f64f68/contrib/views/pom.xml -- diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml index c304e12..ad8ae8c 100644 --- a/contrib/views/pom.xml +++ b/contrib/views/pom.xml @@ -38,7 +38,6 @@ pig slider capacity-scheduler -hive tez utils @@ -146,6 +145,19 @@ + + + linux + + + unix + + + +hive + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/96f64f68/pom.xml -- diff --git a/pom.xml b/pom.xml index 15cd030..513f780 100644 --- a/pom.xml +++ b/pom.xml @@ -480,7 +480,6 @@ ambari-project ambari-views ambari-admin -contrib/ambari-scom/metrics-sink ambari-metrics ambari-server ambari-agent
ambari git commit: AMBARI-11847: [WinTP2] Skip building hive view on Windows (jluniya)
Repository: ambari Updated Branches: refs/heads/trunk 585165305 -> 5ade3e643 AMBARI-11847: [WinTP2] Skip building hive view on Windows (jluniya) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5ade3e64 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5ade3e64 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5ade3e64 Branch: refs/heads/trunk Commit: 5ade3e643d67d9b6b141aff9edb69374ef9f749c Parents: 5851653 Author: Jayush Luniya Authored: Wed Jun 10 12:55:11 2015 -0700 Committer: Jayush Luniya Committed: Wed Jun 10 12:55:11 2015 -0700 -- contrib/views/pom.xml | 14 +- pom.xml | 1 - 2 files changed, 13 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5ade3e64/contrib/views/pom.xml -- diff --git a/contrib/views/pom.xml b/contrib/views/pom.xml index c4a1490..63340f4 100644 --- a/contrib/views/pom.xml +++ b/contrib/views/pom.xml @@ -38,7 +38,6 @@ pig slider capacity-scheduler -hive tez utils @@ -146,6 +145,19 @@ + + + linux + + + unix + + + +hive + + + http://git-wip-us.apache.org/repos/asf/ambari/blob/5ade3e64/pom.xml -- diff --git a/pom.xml b/pom.xml index 93f2169..3972dd0 100644 --- a/pom.xml +++ b/pom.xml @@ -480,7 +480,6 @@ ambari-project ambari-views ambari-admin -contrib/ambari-scom/metrics-sink ambari-metrics ambari-server ambari-agent
ambari git commit: Fix Ranger RU for Hive, Knox, Storm (Gautam Borad via ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.1 cbbaa3f21 -> 81dc95fd9 Fix Ranger RU for Hive, Knox, Storm (Gautam Borad via ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/81dc95fd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/81dc95fd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/81dc95fd Branch: refs/heads/branch-2.1 Commit: 81dc95fd97c34d81a8cdea3078985d617d71fc0c Parents: cbbaa3f Author: Nate Cole Authored: Wed Jun 10 15:37:51 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 15:37:51 2015 -0400 -- .../0.12.0.2.0/package/scripts/hive_server.py | 2 +- .../package/scripts/setup_ranger_hive.py| 10 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 2 +- .../package/scripts/setup_ranger_knox.py| 10 +- .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 2 +- .../package/scripts/setup_ranger_storm.py | 10 +- .../0.9.1.2.1/package/scripts/ui_server.py | 2 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 114 --- ambari-web/app/data/HDP2.3/site_properties.js | 2 +- 9 files changed, 99 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/81dc95fd/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py index de7f864..e29df4f 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py @@ -86,7 +86,7 @@ class HiveServerDefault(HiveServer): env.set_params(params) self.configure(env) # FOR SECURITY -setup_ranger_hive() +setup_ranger_hive(rolling_upgrade=rolling_restart) hive_service( 'hiveserver2', action = 'start', rolling_restart=rolling_restart) def stop(self, env, rolling_restart=False): http://git-wip-us.apache.org/repos/asf/ambari/blob/81dc95fd/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py index ac7f473..b0f0c3f 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py @@ -19,7 +19,7 @@ limitations under the License. """ from resource_management.core.logger import Logger -def setup_ranger_hive(): +def setup_ranger_hive(rolling_upgrade = False): import params if params.has_ranger_admin: @@ -29,6 +29,10 @@ def setup_ranger_hive(): else: from resource_management.libraries.functions.setup_ranger_plugin import setup_ranger_plugin +hdp_version = None +if rolling_upgrade: + hdp_version = params.version + setup_ranger_plugin('hive-server2', 'hive', params.ranger_downloaded_custom_connector, params.ranger_driver_curl_source, params.ranger_driver_curl_target, params.java64_home, @@ -42,7 +46,7 @@ def setup_ranger_hive(): plugin_policymgr_ssl_properties=params.config['configurations']['ranger-hive-policymgr-ssl'], plugin_policymgr_ssl_attributes=params.config['configuration_attributes']['ranger-hive-policymgr-ssl'], component_list=['hive-client', 'hive-metastore', 'hive-server2'], audit_db_is_enabled=params.xa_audit_db_is_enabled, credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password, - ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password -) + ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password, +hdp_version_override = hdp_version) else: Logger.info('Ranger admin not installed') http://git-wip-us.apache.org/repos/asf/ambari/blob/81dc95fd/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --g
ambari git commit: Fix Ranger RU for Hive, Knox, Storm (Gautam Borad via ncole)
Repository: ambari Updated Branches: refs/heads/trunk eb3f9cf74 -> 585165305 Fix Ranger RU for Hive, Knox, Storm (Gautam Borad via ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/58516530 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/58516530 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/58516530 Branch: refs/heads/trunk Commit: 58516530508d929ed62d87189e120fc1479ee1ce Parents: eb3f9cf Author: Nate Cole Authored: Wed Jun 10 15:35:29 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 15:35:29 2015 -0400 -- .../0.12.0.2.0/package/scripts/hive_server.py | 2 +- .../package/scripts/setup_ranger_hive.py| 10 +- .../0.5.0.2.2/package/scripts/knox_gateway.py | 2 +- .../package/scripts/setup_ranger_knox.py| 10 +- .../STORM/0.9.1.2.1/package/scripts/nimbus.py | 2 +- .../package/scripts/setup_ranger_storm.py | 10 +- .../0.9.1.2.1/package/scripts/ui_server.py | 2 +- .../stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 114 --- ambari-web/app/data/HDP2.3/site_properties.js | 2 +- 9 files changed, 99 insertions(+), 55 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/58516530/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py index de7f864..e29df4f 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server.py @@ -86,7 +86,7 @@ class HiveServerDefault(HiveServer): env.set_params(params) self.configure(env) # FOR SECURITY -setup_ranger_hive() +setup_ranger_hive(rolling_upgrade=rolling_restart) hive_service( 'hiveserver2', action = 'start', rolling_restart=rolling_restart) def stop(self, env, rolling_restart=False): http://git-wip-us.apache.org/repos/asf/ambari/blob/58516530/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py index ac7f473..b0f0c3f 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/setup_ranger_hive.py @@ -19,7 +19,7 @@ limitations under the License. """ from resource_management.core.logger import Logger -def setup_ranger_hive(): +def setup_ranger_hive(rolling_upgrade = False): import params if params.has_ranger_admin: @@ -29,6 +29,10 @@ def setup_ranger_hive(): else: from resource_management.libraries.functions.setup_ranger_plugin import setup_ranger_plugin +hdp_version = None +if rolling_upgrade: + hdp_version = params.version + setup_ranger_plugin('hive-server2', 'hive', params.ranger_downloaded_custom_connector, params.ranger_driver_curl_source, params.ranger_driver_curl_target, params.java64_home, @@ -42,7 +46,7 @@ def setup_ranger_hive(): plugin_policymgr_ssl_properties=params.config['configurations']['ranger-hive-policymgr-ssl'], plugin_policymgr_ssl_attributes=params.config['configuration_attributes']['ranger-hive-policymgr-ssl'], component_list=['hive-client', 'hive-metastore', 'hive-server2'], audit_db_is_enabled=params.xa_audit_db_is_enabled, credential_file=params.credential_file, xa_audit_db_password=params.xa_audit_db_password, - ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password -) + ssl_truststore_password=params.ssl_truststore_password, ssl_keystore_password=params.ssl_keystore_password, +hdp_version_override = hdp_version) else: Logger.info('Ranger admin not installed') http://git-wip-us.apache.org/repos/asf/ambari/blob/58516530/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox_gateway.py -- diff --git a/amba
ambari git commit: AMBARI-11816. Graphical widgets for legend and discription width not match.(xiwang)
Repository: ambari Updated Branches: refs/heads/branch-2.1 466a421da -> cbbaa3f21 AMBARI-11816. Graphical widgets for legend and discription width not match.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbbaa3f2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbbaa3f2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbbaa3f2 Branch: refs/heads/branch-2.1 Commit: cbbaa3f2140ceeadce375d8d6d6e2161bc011c9c Parents: 466a421 Author: Xi Wang Authored: Tue Jun 9 14:13:53 2015 -0700 Committer: Xi Wang Committed: Wed Jun 10 11:51:55 2015 -0700 -- ambari-web/app/styles/enhanced_service_dashboard.less | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbbaa3f2/ambari-web/app/styles/enhanced_service_dashboard.less -- diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less index 0ff9c88..e55f9c7 100644 --- a/ambari-web/app/styles/enhanced_service_dashboard.less +++ b/ambari-web/app/styles/enhanced_service_dashboard.less @@ -237,8 +237,7 @@ background: rgba(255,255,255, 0.7); } } - .thumbnail .chart-legend ul { -max-width: 300px; + .thumbnail .chart-legend { .description-line { padding: 3px 3px 8px 8px; line-height: 16px; @@ -246,7 +245,7 @@ font-weight: bold; word-wrap: break-word; white-space: pre-wrap; - overflow: scroll; + overflow-y: scroll; } } } @@ -258,7 +257,7 @@ font-weight: bold; word-wrap: break-word; white-space: pre-wrap; - overflow: scroll; + overflow-y: scroll; } #edit-widget-wizard,
ambari git commit: AMBARI-11816. Graphical widgets for legend and discription width not match.(xiwang)
Repository: ambari Updated Branches: refs/heads/trunk e05ee943e -> eb3f9cf74 AMBARI-11816. Graphical widgets for legend and discription width not match.(xiwang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/eb3f9cf7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eb3f9cf7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eb3f9cf7 Branch: refs/heads/trunk Commit: eb3f9cf74ef2ad8c8e95a2e09e9408bf989e9a3a Parents: e05ee94 Author: Xi Wang Authored: Tue Jun 9 14:13:53 2015 -0700 Committer: Xi Wang Committed: Wed Jun 10 11:50:53 2015 -0700 -- ambari-web/app/styles/enhanced_service_dashboard.less | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/eb3f9cf7/ambari-web/app/styles/enhanced_service_dashboard.less -- diff --git a/ambari-web/app/styles/enhanced_service_dashboard.less b/ambari-web/app/styles/enhanced_service_dashboard.less index 0ff9c88..e55f9c7 100644 --- a/ambari-web/app/styles/enhanced_service_dashboard.less +++ b/ambari-web/app/styles/enhanced_service_dashboard.less @@ -237,8 +237,7 @@ background: rgba(255,255,255, 0.7); } } - .thumbnail .chart-legend ul { -max-width: 300px; + .thumbnail .chart-legend { .description-line { padding: 3px 3px 8px 8px; line-height: 16px; @@ -246,7 +245,7 @@ font-weight: bold; word-wrap: break-word; white-space: pre-wrap; - overflow: scroll; + overflow-y: scroll; } } } @@ -258,7 +257,7 @@ font-weight: bold; word-wrap: break-word; white-space: pre-wrap; - overflow: scroll; + overflow-y: scroll; } #edit-widget-wizard,
[1/2] ambari git commit: AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA. Additional fix (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 20a899d91 -> 466a421da refs/heads/trunk 6779e0c95 -> e05ee943e AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA. Additional fix (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/466a421d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/466a421d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/466a421d Branch: refs/heads/branch-2.1 Commit: 466a421da267b29b2f22b45e7af9ca4b2a0ca1d0 Parents: 20a899d Author: Lisnichenko Dmitro Authored: Wed Jun 10 20:45:37 2015 +0300 Committer: Lisnichenko Dmitro Committed: Wed Jun 10 20:45:37 2015 +0300 -- .../STORM/0.9.1.2.1/package/scripts/params_linux.py | 8 .../STORM/0.9.1.2.1/package/scripts/params_windows.py | 9 + .../HDP/2.3/services/STORM/configuration/storm-site.xml | 2 +- .../HDPWIN/2.3/services/STORM/configuration/storm-site.xml | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py index d0ed8f0..68f2d0e 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py @@ -90,17 +90,17 @@ storm_zookeeper_port = config['configurations']['storm-site']['storm.zookeeper.p nimbus_seeds_supported = default('/configurations/storm-env/nimbus_seeds_supported', False) nimbus_host = default('/configurations/storm-site/nimbus.host', None) nimbus_seeds = default('/configurations/storm-site/nimbus.seeds', None) -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) -actual_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count', None) -default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', None) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) #Calculate topology.max.replication.wait.time.sec and topology.min.replication.count if len(nimbus_hosts) > 1: + # for HA Nimbus actual_topology_max_replication_wait_time_sec = -1 actual_topology_min_replication_count = 2 else: + # for non-HA Nimbus actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec actual_topology_min_replication_count = default_topology_min_replication_count http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py index 688b1d9..4853762 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management import * from status_params import * +from resource_management.libraries.functions.default import default # server configurations config = Script.get_config() @@ -32,17 +33,17 @@ hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] storm_user = hadoop_user security_enabled = config['configurations']['cluster-env']['security_enabled'] -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait
[2/2] ambari git commit: AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA. Additional fix (dlysnichenko)
AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA. Additional fix (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e05ee943 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e05ee943 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e05ee943 Branch: refs/heads/trunk Commit: e05ee943e513467b40830a2513c4e778221d3ea3 Parents: 6779e0c Author: Lisnichenko Dmitro Authored: Wed Jun 10 20:45:37 2015 +0300 Committer: Lisnichenko Dmitro Committed: Wed Jun 10 20:46:39 2015 +0300 -- .../STORM/0.9.1.2.1/package/scripts/params_linux.py | 8 .../STORM/0.9.1.2.1/package/scripts/params_windows.py | 9 + .../HDP/2.3/services/STORM/configuration/storm-site.xml | 2 +- .../HDPWIN/2.3/services/STORM/configuration/storm-site.xml | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e05ee943/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py index d0ed8f0..68f2d0e 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py @@ -90,17 +90,17 @@ storm_zookeeper_port = config['configurations']['storm-site']['storm.zookeeper.p nimbus_seeds_supported = default('/configurations/storm-env/nimbus_seeds_supported', False) nimbus_host = default('/configurations/storm-site/nimbus.host', None) nimbus_seeds = default('/configurations/storm-site/nimbus.seeds', None) -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) -actual_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count', None) -default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', None) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) #Calculate topology.max.replication.wait.time.sec and topology.min.replication.count if len(nimbus_hosts) > 1: + # for HA Nimbus actual_topology_max_replication_wait_time_sec = -1 actual_topology_min_replication_count = 2 else: + # for non-HA Nimbus actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec actual_topology_min_replication_count = default_topology_min_replication_count http://git-wip-us.apache.org/repos/asf/ambari/blob/e05ee943/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py -- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py index 688b1d9..4853762 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management import * from status_params import * +from resource_management.libraries.functions.default import default # server configurations config = Script.get_config() @@ -32,17 +33,17 @@ hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] storm_user = hadoop_user security_enabled = config['configurations']['cluster-env']['security_enabled'] -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) nimbus_hosts = default("/clus
[2/2] ambari git commit: AMBARI-11842. Add Service wizard: Password configs missing (alexantonenko)
AMBARI-11842. Add Service wizard: Password configs missing (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5c1ffbd2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5c1ffbd2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5c1ffbd2 Branch: refs/heads/branch-2.1 Commit: 5c1ffbd25ad15a2fcb3cfc7cb4787d938de80126 Parents: 4fb176c Author: Alex Antonenko Authored: Wed Jun 10 19:24:40 2015 +0300 Committer: Alex Antonenko Committed: Wed Jun 10 20:41:09 2015 +0300 -- ambari-web/app/controllers/wizard/step7_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/5c1ffbd2/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index fdc11c7..d20cee5 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -930,7 +930,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E var mappedConfigValue = type && configsMap[type] ? configsMap[type][_config.name] : null; if (!Em.isNone(mappedConfigValue) && ((installedServiceNames && installedServiceNames.contains(_config.serviceName) || nonServiceTab.someProperty('serviceName', _config.serviceName { // prevent overriding already edited properties -if (_config.savedValue != mappedConfigValue) { +if (_config.savedValue != mappedConfigValue || _config.displayType == 'password') { _config.value = mappedConfigValue; } _config.savedValue = mappedConfigValue;
[1/2] ambari git commit: AMBARI-11843. Host config groups are lost (alexantonenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 4fb176cca -> 20a899d91 AMBARI-11843. Host config groups are lost (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/20a899d9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/20a899d9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/20a899d9 Branch: refs/heads/branch-2.1 Commit: 20a899d91fac6cac31dbb55099395616357bbaa4 Parents: 5c1ffbd Author: Alex Antonenko Authored: Wed Jun 10 19:34:53 2015 +0300 Committer: Alex Antonenko Committed: Wed Jun 10 20:41:09 2015 +0300 -- .../service/manage_config_groups_controller.js | 6 -- .../main/service/configs/config_overridable.js | 22 +--- ambari-web/app/utils/array_utils.js | 20 ++ 3 files changed, 43 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/20a899d9/ambari-web/app/controllers/main/service/manage_config_groups_controller.js -- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index df60dc6..f36158c 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -168,7 +168,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { toClearHosts: groupsToClearHosts, toDelete: groupsToDelete, toSetHosts: groupsToSetHosts, - toCreate: groupsToCreate + toCreate: groupsToCreate, + initialGroups: originalGroupsCopy }; }.property('selectedConfigGroup.hosts.@each', 'selectedConfigGroup.hosts.length', 'selectedConfigGroup.description', 'configGroups', 'isLoaded'), @@ -780,7 +781,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { if (!deleteQueriesRun && deleteQueriesCounter > 0) { deleteQueriesRun = true; modifiedConfigGroups.toClearHosts.forEach(function (cg) { - configsController.clearConfigurationGroupHosts(cg, finishFunction, finishFunction); + var initalGroupState = modifiedConfigGroups.initialGroups.findProperty('name', cg.get('name')); + configsController.clearConfigurationGroupHosts(cg, initalGroupState, finishFunction, finishFunction); }, this); modifiedConfigGroups.toDelete.forEach(function (cg) { configsController.deleteConfigurationGroup(cg, finishFunction, finishFunction); http://git-wip-us.apache.org/repos/asf/ambari/blob/20a899d9/ambari-web/app/mixins/main/service/configs/config_overridable.js -- diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js index df45e81..405e934 100644 --- a/ambari-web/app/mixins/main/service/configs/config_overridable.js +++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js @@ -17,6 +17,7 @@ */ var App = require('app'); +var arrayUtils = require('utils/array_utils'); /** * Mixin with methods for config groups and overrides processing @@ -358,20 +359,35 @@ App.ConfigOverridable = Em.Mixin.create({ }, /** - * Update config group's hosts list (clear it) + * Update config group's hosts list and leave only unmodified hosts in the group * Save updated config group on server * @param {App.ConfigGroup} configGroup + * @param {App.ConfigGroup} initalGroupState * @param {Function} successCallback * @param {Function} errorCallback * @method clearConfigurationGroupHosts */ - clearConfigurationGroupHosts: function (configGroup, successCallback, errorCallback) { + clearConfigurationGroupHosts: function (configGroup, initalGroupState, successCallback, errorCallback) { configGroup = jQuery.extend({}, configGroup); -configGroup.set('hosts', []); +var unmodifiedHosts = this.getUnmodifiedHosts(configGroup, initalGroupState); +configGroup.set('hosts', unmodifiedHosts); this.updateConfigurationGroup(configGroup, successCallback, errorCallback); }, /** + * Get the list of hosts that is not modified in the group + * @param configGroup - the new configuration of the group + * @param initialGroupState - the initial configuration of the group + * @returns {Array} + */ + getUnmodifiedHosts: function (configGroup, initialGroupState) { +var currentHosts = configGroup.get('hosts'); +var initialHosts = initialGroupState.get('hosts'); + +return arrayUtils.intersect(currentH
[1/2] ambari git commit: AMBARI-11842. Add Service wizard: Password configs missing (alexantonenko)
Repository: ambari Updated Branches: refs/heads/trunk cd9d915aa -> 6779e0c95 AMBARI-11842. Add Service wizard: Password configs missing (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ec31c8a9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ec31c8a9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ec31c8a9 Branch: refs/heads/trunk Commit: ec31c8a9dae0c2b9ccddc13dc5a1119ee472489c Parents: cd9d915 Author: Alex Antonenko Authored: Wed Jun 10 19:24:40 2015 +0300 Committer: Alex Antonenko Committed: Wed Jun 10 20:37:21 2015 +0300 -- ambari-web/app/controllers/wizard/step7_controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/ec31c8a9/ambari-web/app/controllers/wizard/step7_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js index fdc11c7..d20cee5 100644 --- a/ambari-web/app/controllers/wizard/step7_controller.js +++ b/ambari-web/app/controllers/wizard/step7_controller.js @@ -930,7 +930,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E var mappedConfigValue = type && configsMap[type] ? configsMap[type][_config.name] : null; if (!Em.isNone(mappedConfigValue) && ((installedServiceNames && installedServiceNames.contains(_config.serviceName) || nonServiceTab.someProperty('serviceName', _config.serviceName { // prevent overriding already edited properties -if (_config.savedValue != mappedConfigValue) { +if (_config.savedValue != mappedConfigValue || _config.displayType == 'password') { _config.value = mappedConfigValue; } _config.savedValue = mappedConfigValue;
[2/2] ambari git commit: AMBARI-11843. Host config groups are lost (alexantonenko)
AMBARI-11843. Host config groups are lost (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6779e0c9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6779e0c9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6779e0c9 Branch: refs/heads/trunk Commit: 6779e0c95a23e7c45b9792d8136f4792f4587da1 Parents: ec31c8a Author: Alex Antonenko Authored: Wed Jun 10 19:34:53 2015 +0300 Committer: Alex Antonenko Committed: Wed Jun 10 20:37:22 2015 +0300 -- .../service/manage_config_groups_controller.js | 6 -- .../main/service/configs/config_overridable.js | 22 +--- ambari-web/app/utils/array_utils.js | 20 ++ 3 files changed, 43 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6779e0c9/ambari-web/app/controllers/main/service/manage_config_groups_controller.js -- diff --git a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js index df60dc6..f36158c 100644 --- a/ambari-web/app/controllers/main/service/manage_config_groups_controller.js +++ b/ambari-web/app/controllers/main/service/manage_config_groups_controller.js @@ -168,7 +168,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { toClearHosts: groupsToClearHosts, toDelete: groupsToDelete, toSetHosts: groupsToSetHosts, - toCreate: groupsToCreate + toCreate: groupsToCreate, + initialGroups: originalGroupsCopy }; }.property('selectedConfigGroup.hosts.@each', 'selectedConfigGroup.hosts.length', 'selectedConfigGroup.description', 'configGroups', 'isLoaded'), @@ -780,7 +781,8 @@ App.ManageConfigGroupsController = Em.Controller.extend(App.ConfigOverridable, { if (!deleteQueriesRun && deleteQueriesCounter > 0) { deleteQueriesRun = true; modifiedConfigGroups.toClearHosts.forEach(function (cg) { - configsController.clearConfigurationGroupHosts(cg, finishFunction, finishFunction); + var initalGroupState = modifiedConfigGroups.initialGroups.findProperty('name', cg.get('name')); + configsController.clearConfigurationGroupHosts(cg, initalGroupState, finishFunction, finishFunction); }, this); modifiedConfigGroups.toDelete.forEach(function (cg) { configsController.deleteConfigurationGroup(cg, finishFunction, finishFunction); http://git-wip-us.apache.org/repos/asf/ambari/blob/6779e0c9/ambari-web/app/mixins/main/service/configs/config_overridable.js -- diff --git a/ambari-web/app/mixins/main/service/configs/config_overridable.js b/ambari-web/app/mixins/main/service/configs/config_overridable.js index df45e81..405e934 100644 --- a/ambari-web/app/mixins/main/service/configs/config_overridable.js +++ b/ambari-web/app/mixins/main/service/configs/config_overridable.js @@ -17,6 +17,7 @@ */ var App = require('app'); +var arrayUtils = require('utils/array_utils'); /** * Mixin with methods for config groups and overrides processing @@ -358,20 +359,35 @@ App.ConfigOverridable = Em.Mixin.create({ }, /** - * Update config group's hosts list (clear it) + * Update config group's hosts list and leave only unmodified hosts in the group * Save updated config group on server * @param {App.ConfigGroup} configGroup + * @param {App.ConfigGroup} initalGroupState * @param {Function} successCallback * @param {Function} errorCallback * @method clearConfigurationGroupHosts */ - clearConfigurationGroupHosts: function (configGroup, successCallback, errorCallback) { + clearConfigurationGroupHosts: function (configGroup, initalGroupState, successCallback, errorCallback) { configGroup = jQuery.extend({}, configGroup); -configGroup.set('hosts', []); +var unmodifiedHosts = this.getUnmodifiedHosts(configGroup, initalGroupState); +configGroup.set('hosts', unmodifiedHosts); this.updateConfigurationGroup(configGroup, successCallback, errorCallback); }, /** + * Get the list of hosts that is not modified in the group + * @param configGroup - the new configuration of the group + * @param initialGroupState - the initial configuration of the group + * @returns {Array} + */ + getUnmodifiedHosts: function (configGroup, initialGroupState) { +var currentHosts = configGroup.get('hosts'); +var initialHosts = initialGroupState.get('hosts'); + +return arrayUtils.intersect(currentHosts, initialHosts); + }, + + /** * Do request to delete config group * @param {A
ambari git commit: AMBARI-11846. Add hive2 credential to oozie-site.xml for RU (ncole)
Repository: ambari Updated Branches: refs/heads/branch-2.1 0dd1cabac -> 4fb176cca AMBARI-11846. Add hive2 credential to oozie-site.xml for RU (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fb176cc Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fb176cc Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fb176cc Branch: refs/heads/branch-2.1 Commit: 4fb176cca9fa2437019b8bc52e8c2bb79580f458 Parents: 0dd1cab Author: Nate Cole Authored: Wed Jun 10 13:22:39 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 13:22:51 2015 -0400 -- .../common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml | 2 +- .../src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fb176cc/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml index 8b44ae6..9ef56ca 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml @@ -42,7 +42,7 @@ oozie.credentials.credentialclasses -hcat=org.apache.oozie.action.hadoop.HCatCredentials + hcat=org.apache.oozie.action.hadoop.HCatCredentials,hive2=org.apache.oozie.action.hadoop.Hive2Credentials Credential Class to be used for HCat. http://git-wip-us.apache.org/repos/asf/ambari/blob/4fb176cc/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 10bca13..cc5caf1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -889,7 +889,6 @@ oozie.authentication.type oozie.authentication.simple.anonymous.allowed oozie.authentication.kerberos.name.rules - oozie.credentials.credentialclasses oozie.service.AuthorizationService.authorization.enabled oozie.service.HadoopAccessorService.hadoop.configurations oozie.service.HadoopAccessorService.kerberos.enabled @@ -904,6 +903,7 @@ oozie.service.ELService.ext.functions.coord-sla-submit oozie.service.ELService.ext.functions.coord-sla-create +
ambari git commit: AMBARI-11846. Add hive2 credential to oozie-site.xml for RU (ncole)
Repository: ambari Updated Branches: refs/heads/trunk 829a5e85c -> cd9d915aa AMBARI-11846. Add hive2 credential to oozie-site.xml for RU (ncole) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd9d915a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd9d915a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd9d915a Branch: refs/heads/trunk Commit: cd9d915aa6f9d1f84455f739e6ed5be826adcba1 Parents: 829a5e8 Author: Nate Cole Authored: Wed Jun 10 12:52:22 2015 -0400 Committer: Nate Cole Committed: Wed Jun 10 13:21:54 2015 -0400 -- .../common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml | 2 +- .../src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd9d915a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml index 8b44ae6..9ef56ca 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml +++ b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/configuration/oozie-site.xml @@ -42,7 +42,7 @@ oozie.credentials.credentialclasses -hcat=org.apache.oozie.action.hadoop.HCatCredentials + hcat=org.apache.oozie.action.hadoop.HCatCredentials,hive2=org.apache.oozie.action.hadoop.Hive2Credentials Credential Class to be used for HCat. http://git-wip-us.apache.org/repos/asf/ambari/blob/cd9d915a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml index 10bca13..cc5caf1 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.3.xml @@ -889,7 +889,6 @@ oozie.authentication.type oozie.authentication.simple.anonymous.allowed oozie.authentication.kerberos.name.rules - oozie.credentials.credentialclasses oozie.service.AuthorizationService.authorization.enabled oozie.service.HadoopAccessorService.hadoop.configurations oozie.service.HadoopAccessorService.kerberos.enabled @@ -904,6 +903,7 @@ oozie.service.ELService.ext.functions.coord-sla-submit oozie.service.ELService.ext.functions.coord-sla-create +
ambari git commit: AMBARI-11840. Ambari upgrade crashed due to unable to process WidgetLayoutEntries.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 370d4ca19 -> 0dd1cabac AMBARI-11840. Ambari upgrade crashed due to unable to process WidgetLayoutEntries.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0dd1caba Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0dd1caba Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0dd1caba Branch: refs/heads/branch-2.1 Commit: 0dd1cabacde39c18cc21084565c573ba75784afa Parents: 370d4ca Author: Vitaly Brodetskyi Authored: Wed Jun 10 11:43:53 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 11:43:53 2015 +0300 -- .../ambari/server/controller/AmbariManagementControllerImpl.java| 1 - .../main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0dd1caba/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index 9e8a5e5..49af6d4 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -4188,7 +4188,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle } } widgetLayoutDAO.mergeWithFlush(existingLayoutEntity); -widgetLayoutDAO.refresh(existingLayoutEntity); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/0dd1caba/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java index 2019e3b..5e794a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java @@ -99,6 +99,7 @@ public class WidgetLayoutDAO { EntityManager entityManager = entityManagerProvider.get(); widgetLayoutEntity = entityManager.merge(widgetLayoutEntity); entityManager.flush(); +entityManager.refresh(widgetLayoutEntity); return widgetLayoutEntity; }
ambari git commit: AMBARI-11840. Ambari upgrade crashed due to unable to process WidgetLayoutEntries.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 95f7f6d89 -> 829a5e85c AMBARI-11840. Ambari upgrade crashed due to unable to process WidgetLayoutEntries.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/829a5e85 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/829a5e85 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/829a5e85 Branch: refs/heads/trunk Commit: 829a5e85cb65f2474c4f9fe354ef0ef42de0877b Parents: 95f7f6d Author: Vitaly Brodetskyi Authored: Wed Jun 10 11:41:43 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 11:41:43 2015 +0300 -- .../ambari/server/controller/AmbariManagementControllerImpl.java| 1 - .../main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/829a5e85/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java index bd12cee..4a7e305 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java @@ -4221,7 +4221,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle } } widgetLayoutDAO.mergeWithFlush(existingLayoutEntity); -widgetLayoutDAO.refresh(existingLayoutEntity); } } } http://git-wip-us.apache.org/repos/asf/ambari/blob/829a5e85/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java index 2019e3b..5e794a7 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/WidgetLayoutDAO.java @@ -99,6 +99,7 @@ public class WidgetLayoutDAO { EntityManager entityManager = entityManagerProvider.get(); widgetLayoutEntity = entityManager.merge(widgetLayoutEntity); entityManager.flush(); +entityManager.refresh(widgetLayoutEntity); return widgetLayoutEntity; }
[1/2] ambari git commit: AMBARI-11557. yarn.admin.acl set to empty string causes all data to be exposed in Tez view (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c66fb49c2 -> 370d4ca19 refs/heads/trunk e93d40045 -> 95f7f6d89 AMBARI-11557. yarn.admin.acl set to empty string causes all data to be exposed in Tez view (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/95f7f6d8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/95f7f6d8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/95f7f6d8 Branch: refs/heads/trunk Commit: 95f7f6d89a9a5883faaf99dbb9dd6c085452679b Parents: e93d400 Author: Andrew Onishuk Authored: Wed Jun 10 20:00:25 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 20:00:25 2015 +0300 -- .../src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/95f7f6d8/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json index e9482ab..ff8dc2c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json @@ -19,7 +19,6 @@ "yarn.timeline-service.enabled": "true", "yarn.timeline-service.http-authentication.type": "kerberos", "yarn.acl.enable": "true", -"yarn.admin.acl": " ", "yarn.timeline-service.http-authentication.signature.secret": "", "yarn.timeline-service.http-authentication.signature.secret.file": "", "yarn.timeline-service.http-authentication.signer.secret.provider": "",
[2/2] ambari git commit: AMBARI-11557. yarn.admin.acl set to empty string causes all data to be exposed in Tez view (aonishuk)
AMBARI-11557. yarn.admin.acl set to empty string causes all data to be exposed in Tez view (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/370d4ca1 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/370d4ca1 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/370d4ca1 Branch: refs/heads/branch-2.1 Commit: 370d4ca1977335265bc97d66214612794a2d76d3 Parents: c66fb49 Author: Andrew Onishuk Authored: Wed Jun 10 20:00:27 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 20:00:27 2015 +0300 -- .../src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/370d4ca1/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json index e9482ab..ff8dc2c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json +++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/YARN/kerberos.json @@ -19,7 +19,6 @@ "yarn.timeline-service.enabled": "true", "yarn.timeline-service.http-authentication.type": "kerberos", "yarn.acl.enable": "true", -"yarn.admin.acl": " ", "yarn.timeline-service.http-authentication.signature.secret": "", "yarn.timeline-service.http-authentication.signature.secret.file": "", "yarn.timeline-service.http-authentication.signer.secret.provider": "",
[1/2] ambari git commit: AMBARI-11834. Add Service Wizard: disable Deploy button after click (after Kerberos enabling) (akovalenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3d020b0c6 -> c66fb49c2 AMBARI-11834. Add Service Wizard: disable Deploy button after click (after Kerberos enabling) (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/01ca2838 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/01ca2838 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/01ca2838 Branch: refs/heads/branch-2.1 Commit: 01ca28386e2022aa9b189f15812d95866429af0d Parents: 3d020b0 Author: Aleksandr Kovalenko Authored: Wed Jun 10 18:32:57 2015 +0300 Committer: Aleksandr Kovalenko Committed: Wed Jun 10 19:56:18 2015 +0300 -- .../app/controllers/main/admin/kerberos.js | 6 +- .../main/admin/kerberos/step3_controller.js | 11 +-- .../app/controllers/wizard/step8_controller.js | 86 +++--- ambari-web/app/mixins.js| 1 - .../mixins/wizard/wizardDeployProgressView.js | 96 .../wizard/wizardProgressPageController.js | 13 ++- ambari-web/app/utils/ajax/ajax.js | 22 ++--- ambari-web/app/views/wizard/step8_view.js | 10 +- .../test/controllers/wizard/step8_test.js | 18 ++-- ambari-web/test/views/wizard/step8_view_test.js | 67 -- 10 files changed, 108 insertions(+), 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/01ca2838/ambari-web/app/controllers/main/admin/kerberos.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js index ecd79a6..2bc7cfd 100644 --- a/ambari-web/app/controllers/main/admin/kerberos.js +++ b/ambari-web/app/controllers/main/admin/kerberos.js @@ -210,7 +210,6 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ * @param data {object} * @param opt {object} * @param params {object} - * @returns {App.ModalPopup|undefined} */ runSecurityCheckSuccess: function (data, opt, params) { //TODO correct check @@ -366,7 +365,7 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ return configProperties; }, - getKDCSessionState: function(callback) { + getKDCSessionState: function(callback, kdcCancelHandler) { if (this.get('securityEnabled')) { App.ajax.send({ name: 'kerberos.session.state', @@ -374,7 +373,8 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ data: { callback: callback }, -success: 'checkState' +success: 'checkState', +kdcCancelHandler: kdcCancelHandler }) } else { callback(); http://git-wip-us.apache.org/repos/asf/ambari/blob/01ca2838/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js index 8946481..b51f8ec 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js @@ -52,11 +52,6 @@ App.KerberosWizardStep3Controller = App.KerberosProgressPageController.extend({ }); }, - onKDCCancel: function() { -App.router.get(this.get('content.controllerName')).setStepsEnable(); -this.get('tasks').objectAt(this.get('currentTaskId')).set('status', 'FAILED'); - }, - getKerberosClientState: function() { return App.ajax.send({ name: 'common.service_component.info', @@ -70,12 +65,16 @@ App.KerberosWizardStep3Controller = App.KerberosProgressPageController.extend({ }, testKerberos: function() { +var self = this; App.ajax.send({ 'name': 'service.item.smoke', 'sender': this, 'success': 'startPolling', 'error': 'onTestKerberosError', - 'kdcCancelHandler': 'onKDCCancel', + 'kdcCancelHandler': function() { +App.router.get(self.get('content.controllerName')).setStepsEnable(); +self.get('tasks').objectAt(self.get('currentTaskId')).set('status', 'FAILED'); + }, 'data': { 'serviceName': this.serviceName, 'displayName': App.format.role(this.serviceName), http://git-wip-us.apache.org/repos/asf/ambari/blob/01ca2838/ambari-web/app/controllers/wizard/step8_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 6aef9bc..b44f900 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/control
[2/2] ambari git commit: AMBARI-11845. Popup during enabling HDFS ranger plugin should not happen for 2.2 stack (akovalenko)
AMBARI-11845. Popup during enabling HDFS ranger plugin should not happen for 2.2 stack (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c66fb49c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c66fb49c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c66fb49c Branch: refs/heads/branch-2.1 Commit: c66fb49c2b21e21b40b1407043169bfb96393e64 Parents: 01ca283 Author: Aleksandr Kovalenko Authored: Wed Jun 10 19:54:46 2015 +0300 Committer: Aleksandr Kovalenko Committed: Wed Jun 10 19:57:28 2015 +0300 -- ambari-web/app/utils/configs/modification_handlers/hdfs.js | 4 ++-- ambari-web/app/utils/configs/modification_handlers/misc.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/c66fb49c/ambari-web/app/utils/configs/modification_handlers/hdfs.js -- diff --git a/ambari-web/app/utils/configs/modification_handlers/hdfs.js b/ambari-web/app/utils/configs/modification_handlers/hdfs.js index bd18a48..ad97e22 100644 --- a/ambari-web/app/utils/configs/modification_handlers/hdfs.js +++ b/ambari-web/app/utils/configs/modification_handlers/hdfs.js @@ -26,13 +26,13 @@ module.exports = App.ServiceConfigModificationHandler.create({ var newValue = changedConfig.get("value"); var rangerPluginEnabledName = "ranger-hdfs-plugin-enabled"; var affectedPropertyName = changedConfig.get("name"); -if (affectedPropertyName == rangerPluginEnabledName) { +if (App.get('isHadoop23Stack') && affectedPropertyName == rangerPluginEnabledName) { var configDfsPermissionsEnabled = this.getConfig(allConfigs, 'dfs.permissions.enabled', 'hdfs-site.xml', 'HDFS'); var configAttributesProviderClass = this.getConfig(allConfigs, 'dfs.namenode.inode.attributes.provider.class', 'hdfs-site.xml', 'HDFS'); var isAttributesProviderClassSet = typeof configAttributesProviderClass !== 'undefined'; var rangerPluginEnabled = newValue == "Yes"; - var newDfsPermissionsEnabled = rangerPluginEnabled ? "true" : "true"; + var newDfsPermissionsEnabled = rangerPluginEnabled ? "true" : "false"; var newAttributesProviderClass = 'org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer'; // Add HDFS-Ranger configs http://git-wip-us.apache.org/repos/asf/ambari/blob/c66fb49c/ambari-web/app/utils/configs/modification_handlers/misc.js -- diff --git a/ambari-web/app/utils/configs/modification_handlers/misc.js b/ambari-web/app/utils/configs/modification_handlers/misc.js index 2af27ef..449b830 100644 --- a/ambari-web/app/utils/configs/modification_handlers/misc.js +++ b/ambari-web/app/utils/configs/modification_handlers/misc.js @@ -65,7 +65,7 @@ module.exports = App.ServiceConfigModificationHandler.create({ currentUsers = currentAclValueSplits[0]; currentGroups = currentAclValueSplits[1]; } else { -currentUsers = currentAclValueSplits.length > 0 ? currentAclValueSplits.shift() : '' +currentUsers = currentAclValueSplits.length > 0 ? currentAclValueSplits.shift() : ''; currentGroups = currentAclValueSplits.join(" "); } var currentUserList = currentUsers.split(',').filter(function(i) { return !Em.isEmpty(i); });
[3/3] ambari git commit: AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment.
AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d020b0c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d020b0c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d020b0c Branch: refs/heads/branch-2.1 Commit: 3d020b0c60b526d30095e78e5f9911cbd053519e Parents: 7ba9ad8 Author: Siddharth Wagle Authored: Wed Jun 10 09:55:33 2015 -0700 Committer: Siddharth Wagle Committed: Wed Jun 10 09:55:33 2015 -0700 -- .../HBASE/0.96.0.2.0/metrics.json |6 +- .../stacks/HDP/2.3/services/HBASE/metrics.json | 9410 ++ 2 files changed, 9413 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d020b0c/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json index a309ec7..ae15651 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json @@ -372,17 +372,17 @@ "temporal": true }, "metrics/hbase/ipc/IPC/numOpenConnections": { - "metric": "regionserver.RegionServer.numOpenConnections", + "metric": "ipc.IPC.numOpenConnections", "pointInTime": false, "temporal": true }, "metrics/hbase/ipc/IPC/numActiveHandler": { - "metric": "regionserver.RegionServer.numActiveHandler", + "metric": "ipc.IPC.numActiveHandler", "pointInTime": false, "temporal": true }, "metrics/hbase/ipc/IPC/numCallsInGeneralQueue": { - "metric": "regionserver.RegionServer.numCallsInGeneralQueue", + "metric": "ipc.IPC.numCallsInGeneralQueue", "pointInTime": false, "temporal": true },
[1/3] ambari git commit: AMBARI-11824. Views: Tez View should automatically work out of the box in Ambari 2.1. (swagle)
Repository: ambari Updated Branches: refs/heads/branch-2.1 31c9646ca -> 3d020b0c6 AMBARI-11824. Views: Tez View should automatically work out of the box in Ambari 2.1. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7ba9ad87 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7ba9ad87 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7ba9ad87 Branch: refs/heads/branch-2.1 Commit: 7ba9ad874328932c448fd29e273d76dd6b60beed Parents: 31c9646 Author: Siddharth Wagle Authored: Wed Jun 10 09:55:08 2015 -0700 Committer: Siddharth Wagle Committed: Wed Jun 10 09:55:08 2015 -0700 -- .../server/api/services/AmbariMetaInfo.java | 9 + .../commands/StackAdvisorCommand.java | 12 +++ .../stacks/HDP/2.1/services/stack_advisor.py| 1 + .../stacks/HDP/2.3/services/stack_advisor.py| 36 .../src/main/resources/stacks/stack_advisor.py | 7 +++- .../commands/StackAdvisorCommandTest.java | 22 6 files changed, 86 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/7ba9ad87/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index a8afcf4..a77f7b1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -206,6 +206,8 @@ public class AmbariMetaInfo { */ private StackManager stackManager; + private Configuration conf; + /** * Ambari Meta Info Object * @@ -214,6 +216,7 @@ public class AmbariMetaInfo { */ @Inject public AmbariMetaInfo(Configuration conf) throws Exception { +this.conf = conf; String stackPath = conf.getMetadataPath(); stackRoot = new File(stackPath); @@ -1283,4 +1286,10 @@ public class AmbariMetaInfo { return kerberosServiceDescriptors; } + /* Return ambari.properties from configuration API. This is to avoid + changing interface impls that do not use injection or use partial + injection like Stack Advisor Commands */ + public Map getAmbariServerProperties() { +return conf.getAmbariProperties(); + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/7ba9ad87/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java index 505ea17..00c8696 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java @@ -46,6 +46,7 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner; import org.apache.ambari.server.controller.spi.Resource; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.codehaus.jackson.JsonNode; @@ -87,6 +88,7 @@ public abstract class StackAdvisorCommand extend private static final String COMPONENT_HOSTNAMES_PROPERTY = "hostnames"; private static final String CONFIGURATIONS_PROPERTY = "configurations"; private static final String CHANGED_CONFIGURATIONS_PROPERTY = "changed-configurations"; + private static final String AMBARI_SERVER_CONFIGURATIONS_PROPERTY = "ambari-server-properties"; private File recommendationsDir; private String stackAdvisorScript; @@ -148,6 +150,7 @@ public abstract class StackAdvisorCommand extend populateComponentHostsMap(root, request.getComponentHostsMap()); populateConfigurations(root, request); populateConfigGroups(root, request); + populateAmbariServerInfo(root); data.servicesJSON = mapper.writeValueAsString(root); } catch (Exception e) { // should not happen @@ -159,6 +162,15 @@ public abstract class StackAdvisorCommand extend return data; } + protected void populateAmbariServerInfo(ObjectNode root) throws StackAdvisorException { +Map serverProperties = metaInfo.getAmbariServerProperties(); + +if (serverPrope
[2/3] ambari git commit: AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3d020b0c/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json new file mode 100644 index 000..a309ec7 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json @@ -0,0 +1,9410 @@ +{ + "HBASE_REGIONSERVER": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "default": { +"metrics/cpu/cpu_idle":{ + "metric":"cpu_idle", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_nice":{ + "metric":"cpu_nice", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_system":{ + "metric":"cpu_system", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_user":{ + "metric":"cpu_user", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_wio":{ + "metric":"cpu_wio", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/disk_free":{ + "metric":"disk_free", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/disk_total":{ + "metric":"disk_total", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/read_bps":{ + "metric":"read_bps", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/write_bps":{ + "metric":"write_bps", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_fifteen":{ + "metric":"load_fifteen", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_five":{ + "metric":"load_five", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_one":{ + "metric":"load_one", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_buffers":{ + "metric":"mem_buffers", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_cached":{ + "metric":"mem_cached", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_free":{ + "metric":"mem_free", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_shared":{ + "metric":"mem_shared", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_total":{ + "metric":"mem_total", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/swap_free":{ + "metric":"swap_free", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/swap_total":{ + "metric":"swap_total", + "pointInTime":true, + "temporal":true +}, +"metrics/network/bytes_in":{ + "metric":"bytes_in", + "pointInTime":true, + "temporal":true +}, +"metrics/network/bytes_out":{ + "metric":"bytes_out", + "pointInTime":true, + "temporal":true +}, +"metrics/network/pkts_in":{ + "metric":"pkts_in", + "pointInTime":true, + "temporal":true +}, +"metrics/network/pkts_out":{ + "metric":"pkts_out", + "pointInTime":true, + "temporal":true +}, +"metrics/process/proc_run":{ + "metric":"proc_run", + "pointInTime":true, + "temporal":true +}, +"metrics/process/proc_total":{ + "metric":"proc_total", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/read_count":{ + "metric":"read_count", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/write_count":{ + "metric":"write_count", + "pointInTime":true, + "temporal":true +}, +
ambari git commit: AMBARI-11845. Popup during enabling HDFS ranger plugin should not happen for 2.2 stack (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk 0f7130749 -> e93d40045 AMBARI-11845. Popup during enabling HDFS ranger plugin should not happen for 2.2 stack (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e93d4004 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e93d4004 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e93d4004 Branch: refs/heads/trunk Commit: e93d40045b8bbfefb78ccac7741ef50ebf4014ae Parents: 0f71307 Author: Aleksandr Kovalenko Authored: Wed Jun 10 19:48:24 2015 +0300 Committer: Aleksandr Kovalenko Committed: Wed Jun 10 19:54:46 2015 +0300 -- ambari-web/app/utils/configs/modification_handlers/hdfs.js | 4 ++-- ambari-web/app/utils/configs/modification_handlers/misc.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e93d4004/ambari-web/app/utils/configs/modification_handlers/hdfs.js -- diff --git a/ambari-web/app/utils/configs/modification_handlers/hdfs.js b/ambari-web/app/utils/configs/modification_handlers/hdfs.js index bd18a48..ad97e22 100644 --- a/ambari-web/app/utils/configs/modification_handlers/hdfs.js +++ b/ambari-web/app/utils/configs/modification_handlers/hdfs.js @@ -26,13 +26,13 @@ module.exports = App.ServiceConfigModificationHandler.create({ var newValue = changedConfig.get("value"); var rangerPluginEnabledName = "ranger-hdfs-plugin-enabled"; var affectedPropertyName = changedConfig.get("name"); -if (affectedPropertyName == rangerPluginEnabledName) { +if (App.get('isHadoop23Stack') && affectedPropertyName == rangerPluginEnabledName) { var configDfsPermissionsEnabled = this.getConfig(allConfigs, 'dfs.permissions.enabled', 'hdfs-site.xml', 'HDFS'); var configAttributesProviderClass = this.getConfig(allConfigs, 'dfs.namenode.inode.attributes.provider.class', 'hdfs-site.xml', 'HDFS'); var isAttributesProviderClassSet = typeof configAttributesProviderClass !== 'undefined'; var rangerPluginEnabled = newValue == "Yes"; - var newDfsPermissionsEnabled = rangerPluginEnabled ? "true" : "true"; + var newDfsPermissionsEnabled = rangerPluginEnabled ? "true" : "false"; var newAttributesProviderClass = 'org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer'; // Add HDFS-Ranger configs http://git-wip-us.apache.org/repos/asf/ambari/blob/e93d4004/ambari-web/app/utils/configs/modification_handlers/misc.js -- diff --git a/ambari-web/app/utils/configs/modification_handlers/misc.js b/ambari-web/app/utils/configs/modification_handlers/misc.js index 2af27ef..449b830 100644 --- a/ambari-web/app/utils/configs/modification_handlers/misc.js +++ b/ambari-web/app/utils/configs/modification_handlers/misc.js @@ -65,7 +65,7 @@ module.exports = App.ServiceConfigModificationHandler.create({ currentUsers = currentAclValueSplits[0]; currentGroups = currentAclValueSplits[1]; } else { -currentUsers = currentAclValueSplits.length > 0 ? currentAclValueSplits.shift() : '' +currentUsers = currentAclValueSplits.length > 0 ? currentAclValueSplits.shift() : ''; currentGroups = currentAclValueSplits.join(" "); } var currentUserList = currentUsers.split(',').filter(function(i) { return !Em.isEmpty(i); });
[2/3] ambari git commit: AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment.
http://git-wip-us.apache.org/repos/asf/ambari/blob/0f713074/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json new file mode 100644 index 000..a309ec7 --- /dev/null +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HBASE/metrics.json @@ -0,0 +1,9410 @@ +{ + "HBASE_REGIONSERVER": { +"Component": [ + { +"type": "ganglia", +"metrics": { + "default": { +"metrics/cpu/cpu_idle":{ + "metric":"cpu_idle", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_nice":{ + "metric":"cpu_nice", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_system":{ + "metric":"cpu_system", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_user":{ + "metric":"cpu_user", + "pointInTime":true, + "temporal":true +}, +"metrics/cpu/cpu_wio":{ + "metric":"cpu_wio", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/disk_free":{ + "metric":"disk_free", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/disk_total":{ + "metric":"disk_total", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/read_bps":{ + "metric":"read_bps", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/write_bps":{ + "metric":"write_bps", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_fifteen":{ + "metric":"load_fifteen", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_five":{ + "metric":"load_five", + "pointInTime":true, + "temporal":true +}, +"metrics/load/load_one":{ + "metric":"load_one", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_buffers":{ + "metric":"mem_buffers", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_cached":{ + "metric":"mem_cached", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_free":{ + "metric":"mem_free", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_shared":{ + "metric":"mem_shared", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/mem_total":{ + "metric":"mem_total", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/swap_free":{ + "metric":"swap_free", + "pointInTime":true, + "temporal":true +}, +"metrics/memory/swap_total":{ + "metric":"swap_total", + "pointInTime":true, + "temporal":true +}, +"metrics/network/bytes_in":{ + "metric":"bytes_in", + "pointInTime":true, + "temporal":true +}, +"metrics/network/bytes_out":{ + "metric":"bytes_out", + "pointInTime":true, + "temporal":true +}, +"metrics/network/pkts_in":{ + "metric":"pkts_in", + "pointInTime":true, + "temporal":true +}, +"metrics/network/pkts_out":{ + "metric":"pkts_out", + "pointInTime":true, + "temporal":true +}, +"metrics/process/proc_run":{ + "metric":"proc_run", + "pointInTime":true, + "temporal":true +}, +"metrics/process/proc_total":{ + "metric":"proc_total", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/read_count":{ + "metric":"read_count", + "pointInTime":true, + "temporal":true +}, +"metrics/disk/write_count":{ + "metric":"write_count", + "pointInTime":true, + "temporal":true +}, +
[1/3] ambari git commit: AMBARI-11824. Views: Tez View should automatically work out of the box in Ambari 2.1. (swagle)
Repository: ambari Updated Branches: refs/heads/trunk 1df38e6de -> 0f7130749 AMBARI-11824. Views: Tez View should automatically work out of the box in Ambari 2.1. (swagle) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/614fd801 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/614fd801 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/614fd801 Branch: refs/heads/trunk Commit: 614fd801fc489fe27cbb0ea6f1ac4a09ebd75477 Parents: 1df38e6 Author: Siddharth Wagle Authored: Tue Jun 9 17:56:18 2015 -0700 Committer: Siddharth Wagle Committed: Wed Jun 10 09:42:52 2015 -0700 -- .../server/api/services/AmbariMetaInfo.java | 9 + .../commands/StackAdvisorCommand.java | 12 +++ .../stacks/HDP/2.1/services/stack_advisor.py| 1 + .../stacks/HDP/2.3/services/stack_advisor.py| 36 .../src/main/resources/stacks/stack_advisor.py | 7 +++- .../commands/StackAdvisorCommandTest.java | 22 6 files changed, 86 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/614fd801/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java index a8afcf4..a77f7b1 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java @@ -206,6 +206,8 @@ public class AmbariMetaInfo { */ private StackManager stackManager; + private Configuration conf; + /** * Ambari Meta Info Object * @@ -214,6 +216,7 @@ public class AmbariMetaInfo { */ @Inject public AmbariMetaInfo(Configuration conf) throws Exception { +this.conf = conf; String stackPath = conf.getMetadataPath(); stackRoot = new File(stackPath); @@ -1283,4 +1286,10 @@ public class AmbariMetaInfo { return kerberosServiceDescriptors; } + /* Return ambari.properties from configuration API. This is to avoid + changing interface impls that do not use injection or use partial + injection like Stack Advisor Commands */ + public Map getAmbariServerProperties() { +return conf.getAmbariProperties(); + } } http://git-wip-us.apache.org/repos/asf/ambari/blob/614fd801/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java index 505ea17..00c8696 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/commands/StackAdvisorCommand.java @@ -46,6 +46,7 @@ import org.apache.ambari.server.api.services.stackadvisor.StackAdvisorRunner; import org.apache.ambari.server.controller.spi.Resource; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.codehaus.jackson.JsonNode; @@ -87,6 +88,7 @@ public abstract class StackAdvisorCommand extend private static final String COMPONENT_HOSTNAMES_PROPERTY = "hostnames"; private static final String CONFIGURATIONS_PROPERTY = "configurations"; private static final String CHANGED_CONFIGURATIONS_PROPERTY = "changed-configurations"; + private static final String AMBARI_SERVER_CONFIGURATIONS_PROPERTY = "ambari-server-properties"; private File recommendationsDir; private String stackAdvisorScript; @@ -148,6 +150,7 @@ public abstract class StackAdvisorCommand extend populateComponentHostsMap(root, request.getComponentHostsMap()); populateConfigurations(root, request); populateConfigGroups(root, request); + populateAmbariServerInfo(root); data.servicesJSON = mapper.writeValueAsString(root); } catch (Exception e) { // should not happen @@ -159,6 +162,15 @@ public abstract class StackAdvisorCommand extend return data; } + protected void populateAmbariServerInfo(ObjectNode root) throws StackAdvisorException { +Map serverProperties = metaInfo.getAmbariServerProperties(); + +if (serverProperties != nu
[3/3] ambari git commit: AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment.
AMBARI-11844. HBase service: Open Connections and Request Handlers widgets does not display with HDP 2.2 stack deployment. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0f713074 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0f713074 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0f713074 Branch: refs/heads/trunk Commit: 0f71307494d982d6bad1825c2a5295e4e0ce7b64 Parents: 614fd80 Author: Siddharth Wagle Authored: Wed Jun 10 09:53:36 2015 -0700 Committer: Siddharth Wagle Committed: Wed Jun 10 09:53:36 2015 -0700 -- .../HBASE/0.96.0.2.0/metrics.json |6 +- .../stacks/HDP/2.3/services/HBASE/metrics.json | 9410 ++ 2 files changed, 9413 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/0f713074/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json -- diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json index a309ec7..ae15651 100644 --- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json +++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/metrics.json @@ -372,17 +372,17 @@ "temporal": true }, "metrics/hbase/ipc/IPC/numOpenConnections": { - "metric": "regionserver.RegionServer.numOpenConnections", + "metric": "ipc.IPC.numOpenConnections", "pointInTime": false, "temporal": true }, "metrics/hbase/ipc/IPC/numActiveHandler": { - "metric": "regionserver.RegionServer.numActiveHandler", + "metric": "ipc.IPC.numActiveHandler", "pointInTime": false, "temporal": true }, "metrics/hbase/ipc/IPC/numCallsInGeneralQueue": { - "metric": "regionserver.RegionServer.numCallsInGeneralQueue", + "metric": "ipc.IPC.numCallsInGeneralQueue", "pointInTime": false, "temporal": true },
[1/2] ambari git commit: AMBARI-11839. 'Oozie Server Status' alert fails on non-root agent (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 4fa3df7f8 -> 31c9646ca refs/heads/trunk 1f371a592 -> 1df38e6de AMBARI-11839. 'Oozie Server Status' alert fails on non-root agent (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1df38e6d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1df38e6d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1df38e6d Branch: refs/heads/trunk Commit: 1df38e6dec4bb2c8751c43fef056e41c17a343ea Parents: 1f371a5 Author: Andrew Onishuk Authored: Wed Jun 10 18:41:19 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 18:41:19 2015 +0300 -- .../python/resource_management/core/shell.py| 5 +++- .../libraries/providers/hdfs_resource.py| 10 +++- .../package/alerts/alert_check_oozie_server.py | 26 ++-- 3 files changed, 26 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1df38e6d/ambari-common/src/main/python/resource_management/core/shell.py -- diff --git a/ambari-common/src/main/python/resource_management/core/shell.py b/ambari-common/src/main/python/resource_management/core/shell.py index 183c735..1ea27f8 100644 --- a/ambari-common/src/main/python/resource_management/core/shell.py +++ b/ambari-common/src/main/python/resource_management/core/shell.py @@ -232,6 +232,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE proc.stdout: "", proc.stderr: "" } +all_output = "" while read_set: ready, _, _ = select.select(read_set, [], []) @@ -245,6 +246,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE continue fd_to_string[out_fd] += line + all_output += line if on_new_line: try: @@ -263,6 +265,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE out = fd_to_string[proc.stdout].strip('\n') err = fd_to_string[proc.stderr].strip('\n') + all_output = all_output.strip('\n') if timeout: if not timeout_event.is_set(): @@ -275,7 +278,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE code = proc.returncode if throw_on_failure and code: -err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_alias, code, out)) +err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_alias, code, all_output)) raise Fail(err_msg) # if separate stderr is enabled (by default it's redirected to out) http://git-wip-us.apache.org/repos/asf/ambari/blob/1df38e6d/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index a2943de..b9fb603 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -22,7 +22,6 @@ Ambari Agent import re import os from resource_management.core.environment import Environment -from resource_management.core import sudo from resource_management.core.base import Fail from resource_management.core.resources.system import Execute from resource_management.core.resources.system import File @@ -37,7 +36,6 @@ from resource_management.libraries.functions import namenode_ha_utils import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. import subprocess -ERR_FILE = "hdfs_resource.err" JSON_PATH = '/var/lib/ambari-agent/data/hdfs_resources.json' JAR_PATH = '/var/lib/ambari-agent/lib/fast-hdfs-resource.jar' @@ -177,9 +175,7 @@ class WebHDFSUtil: if file_to_put and not os.path.exists(file_to_put): raise Fail(format("File {file_to_put} is not found.")) -err_file = os.path.join(Script.get_tmp_dir(), ERR_FILE) - -cmd = ["curl", "-L", "-w", "%{http_code}", "-X", method] +cmd = ["curl", "-sS","-L", "-w", "%{http_code}", "-X", method] if file_to_put: cmd += ["-T", file_to_put] @@ -189,7 +185,7 @@ class WebHDFSUtil: cmd += ["-k"] cmd.append(url) -_, out = shell.checked_call(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False, stderr=err_file) +_, out, err = shell.checked_call(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False, s
[2/2] ambari git commit: AMBARI-11839. 'Oozie Server Status' alert fails on non-root agent (aonishuk)
AMBARI-11839. 'Oozie Server Status' alert fails on non-root agent (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/31c9646c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/31c9646c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/31c9646c Branch: refs/heads/branch-2.1 Commit: 31c9646ca50919f53e7fbd54127230a47195fd88 Parents: 4fa3df7 Author: Andrew Onishuk Authored: Wed Jun 10 18:41:22 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 18:41:22 2015 +0300 -- .../python/resource_management/core/shell.py| 5 +++- .../libraries/providers/hdfs_resource.py| 10 +++- .../package/alerts/alert_check_oozie_server.py | 26 ++-- 3 files changed, 26 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/31c9646c/ambari-common/src/main/python/resource_management/core/shell.py -- diff --git a/ambari-common/src/main/python/resource_management/core/shell.py b/ambari-common/src/main/python/resource_management/core/shell.py index 183c735..1ea27f8 100644 --- a/ambari-common/src/main/python/resource_management/core/shell.py +++ b/ambari-common/src/main/python/resource_management/core/shell.py @@ -232,6 +232,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE proc.stdout: "", proc.stderr: "" } +all_output = "" while read_set: ready, _, _ = select.select(read_set, [], []) @@ -245,6 +246,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE continue fd_to_string[out_fd] += line + all_output += line if on_new_line: try: @@ -263,6 +265,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE out = fd_to_string[proc.stdout].strip('\n') err = fd_to_string[proc.stderr].strip('\n') + all_output = all_output.strip('\n') if timeout: if not timeout_event.is_set(): @@ -275,7 +278,7 @@ def _call(command, logoutput=None, throw_on_failure=True, stdout=subprocess.PIPE code = proc.returncode if throw_on_failure and code: -err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_alias, code, out)) +err_msg = Logger.filter_text(("Execution of '%s' returned %d. %s") % (command_alias, code, all_output)) raise Fail(err_msg) # if separate stderr is enabled (by default it's redirected to out) http://git-wip-us.apache.org/repos/asf/ambari/blob/31c9646c/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py -- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index a2943de..b9fb603 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -22,7 +22,6 @@ Ambari Agent import re import os from resource_management.core.environment import Environment -from resource_management.core import sudo from resource_management.core.base import Fail from resource_management.core.resources.system import Execute from resource_management.core.resources.system import File @@ -37,7 +36,6 @@ from resource_management.libraries.functions import namenode_ha_utils import ambari_simplejson as json # simplejson is much faster comparing to Python 2.6 json module and has the same functions set. import subprocess -ERR_FILE = "hdfs_resource.err" JSON_PATH = '/var/lib/ambari-agent/data/hdfs_resources.json' JAR_PATH = '/var/lib/ambari-agent/lib/fast-hdfs-resource.jar' @@ -177,9 +175,7 @@ class WebHDFSUtil: if file_to_put and not os.path.exists(file_to_put): raise Fail(format("File {file_to_put} is not found.")) -err_file = os.path.join(Script.get_tmp_dir(), ERR_FILE) - -cmd = ["curl", "-L", "-w", "%{http_code}", "-X", method] +cmd = ["curl", "-sS","-L", "-w", "%{http_code}", "-X", method] if file_to_put: cmd += ["-T", file_to_put] @@ -189,7 +185,7 @@ class WebHDFSUtil: cmd += ["-k"] cmd.append(url) -_, out = shell.checked_call(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False, stderr=err_file) +_, out, err = shell.checked_call(cmd, user=self.run_user, logoutput=self.logoutput, quiet=False, stderr=subprocess.PIPE) status_code = out[-3:] out = out[:-3] # remove last line from output which is status code
ambari git commit: AMBARI-11817 [WinTP2] Adding a view fails on Windows
Repository: ambari Updated Branches: refs/heads/branch-2.1 e41cb36a2 -> 4fa3df7f8 AMBARI-11817 [WinTP2] Adding a view fails on Windows Fixed database column description in ViewInstanceEntity and UpgradeCatalog210 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fa3df7f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fa3df7f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fa3df7f Branch: refs/heads/branch-2.1 Commit: 4fa3df7f8ed564b2293f1e66e1f0205664985198 Parents: e41cb36 Author: Florian Barca Authored: Wed Jun 10 08:41:00 2015 -0700 Committer: Florian Barca Committed: Wed Jun 10 08:41:00 2015 -0700 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java | 2 +- ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4fa3df7f/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 85cf39a..036dcce 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -282,7 +282,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { // determine whether to alter the names of the dynamic entities / attributes to // avoid db reserved word conflicts. should be false for existing instances // for backward compatibility. -dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, null, 0, false)); +dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, 0, 0, false)); // cluster configuration dbAccessor.addColumn(VIEW_PARAMETER_TABLE, new DBColumnInfo("cluster_config", String.class, 255, null, true)); // view build number http://git-wip-us.apache.org/repos/asf/ambari/blob/4fa3df7f/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index f71a4ed..02eeb55 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -537,7 +537,7 @@ CREATE TABLE viewinstanceproperty ( view_name VARCHAR(255) NOT NULL, view_instance_name VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, - value VARCHAR(2000) NOT NULL, + value VARCHAR(2000), PRIMARY KEY CLUSTERED ( view_name, view_instance_name,
ambari git commit: AMBARI-11817 [WinTP2] Adding a view fails on Windows
Repository: ambari Updated Branches: refs/heads/trunk efc04b28a -> 1f371a592 AMBARI-11817 [WinTP2] Adding a view fails on Windows Fixed database column description in ViewInstanceEntity and UpgradeCatalog210 Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1f371a59 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1f371a59 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1f371a59 Branch: refs/heads/trunk Commit: 1f371a592d8ea478c1a0c5852f810c8c7277c93e Parents: efc04b2 Author: Florian Barca Authored: Wed Jun 10 08:35:40 2015 -0700 Committer: Florian Barca Committed: Wed Jun 10 08:38:17 2015 -0700 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java | 2 +- ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1f371a59/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 85cf39a..036dcce 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -282,7 +282,7 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { // determine whether to alter the names of the dynamic entities / attributes to // avoid db reserved word conflicts. should be false for existing instances // for backward compatibility. -dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, null, 0, false)); +dbAccessor.addColumn(VIEW_INSTANCE_TABLE, new DBColumnInfo("alter_names", Integer.class, 0, 0, false)); // cluster configuration dbAccessor.addColumn(VIEW_PARAMETER_TABLE, new DBColumnInfo("cluster_config", String.class, 255, null, true)); // view build number http://git-wip-us.apache.org/repos/asf/ambari/blob/1f371a59/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql -- diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql index f71a4ed..02eeb55 100644 --- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql +++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql @@ -537,7 +537,7 @@ CREATE TABLE viewinstanceproperty ( view_name VARCHAR(255) NOT NULL, view_instance_name VARCHAR(255) NOT NULL, NAME VARCHAR(255) NOT NULL, - value VARCHAR(2000) NOT NULL, + value VARCHAR(2000), PRIMARY KEY CLUSTERED ( view_name, view_instance_name,
[1/2] ambari git commit: AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 fa6946093 -> e41cb36a2 refs/heads/trunk cd2e39790 -> efc04b28a AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/efc04b28 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/efc04b28 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/efc04b28 Branch: refs/heads/trunk Commit: efc04b28a4cf17c7f9fed1d01aba8d32b5f43014 Parents: cd2e397 Author: Andrew Onishuk Authored: Wed Jun 10 18:37:06 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 18:37:06 2015 +0300 -- .../services/YARN/configuration/yarn-env.xml| 124 +++ .../services/YARN/configuration/yarn-log4j.xml | 80 2 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/efc04b28/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml index 063e605..44f3dc2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml @@ -25,5 +25,129 @@ true Set to false by default, needs to be set to true in stacks that use Ranger Yarn Plugin + + +content +This is the jinja template for yarn-env.sh file + + export HADOOP_YARN_HOME={{hadoop_yarn_home}} + export YARN_LOG_DIR={{yarn_log_dir_prefix}}/$USER + export YARN_PID_DIR={{yarn_pid_dir_prefix}}/$USER + export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}} + export JAVA_HOME={{java64_home}} + + # We need to add the EWMA appender for the yarn daemons only; + # however, YARN_ROOT_LOGGER is shared by the yarn client and the + # daemons. This is restrict the EWMA appender to daemons only. + INVOKER="${0##*/}" + if [ "$INVOKER" == "yarn-daemon.sh" ]; then +export YARN_ROOT_LOGGER=${YARN_ROOT_LOGGER:-INFO,EWMA,RFA} + fi + + # User for YARN daemons + export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn} + + # resolve links - $0 may be a softlink + export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}" + + # some Java parameters + # export JAVA_HOME=/home/y/libexec/jdk1.6.0/ + if [ "$JAVA_HOME" != "" ]; then + #echo "run java in $JAVA_HOME" + JAVA_HOME=$JAVA_HOME + fi + + if [ "$JAVA_HOME" = "" ]; then + echo "Error: JAVA_HOME is not set." + exit 1 + fi + + JAVA=$JAVA_HOME/bin/java + JAVA_HEAP_MAX=-Xmx1000m + + # For setting YARN specific HEAP sizes please use this + # Parameter and set appropriately + YARN_HEAPSIZE={{yarn_heapsize}} + + # check envvars which might override default args + if [ "$YARN_HEAPSIZE" != "" ]; then + JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m" + fi + + # Resource Manager specific parameters + + # Specify the max Heapsize for the ResourceManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either YARN_OPTS + # and/or YARN_RESOURCEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}} + + # Specify the JVM options to be used when starting the ResourceManager. + # These options will be appended to the options specified as YARN_OPTS + # and therefore may override any similar flags set in YARN_OPTS + #export YARN_RESOURCEMANAGER_OPTS= + # Node Manager specific parameters + + # Specify the max Heapsize for the NodeManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either YARN_OPTS + # and/or YARN_NODEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}} + + # Specify the max Heapsize for the HistoryManager using a numerical value + # in the scale of MB. For example, to specify an jvm optio
[2/2] ambari git commit: AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk)
AMBARI-11128. Add EWMA to yarn log4j appenders in Dal (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e41cb36a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e41cb36a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e41cb36a Branch: refs/heads/branch-2.1 Commit: e41cb36a2ed0100510be370c8a3924314bb96ba9 Parents: fa69460 Author: Andrew Onishuk Authored: Wed Jun 10 18:37:08 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 18:37:08 2015 +0300 -- .../services/YARN/configuration/yarn-env.xml| 124 +++ .../services/YARN/configuration/yarn-log4j.xml | 80 2 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/e41cb36a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml -- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml index 063e605..44f3dc2 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/YARN/configuration/yarn-env.xml @@ -25,5 +25,129 @@ true Set to false by default, needs to be set to true in stacks that use Ranger Yarn Plugin + + +content +This is the jinja template for yarn-env.sh file + + export HADOOP_YARN_HOME={{hadoop_yarn_home}} + export YARN_LOG_DIR={{yarn_log_dir_prefix}}/$USER + export YARN_PID_DIR={{yarn_pid_dir_prefix}}/$USER + export HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}} + export JAVA_HOME={{java64_home}} + + # We need to add the EWMA appender for the yarn daemons only; + # however, YARN_ROOT_LOGGER is shared by the yarn client and the + # daemons. This is restrict the EWMA appender to daemons only. + INVOKER="${0##*/}" + if [ "$INVOKER" == "yarn-daemon.sh" ]; then +export YARN_ROOT_LOGGER=${YARN_ROOT_LOGGER:-INFO,EWMA,RFA} + fi + + # User for YARN daemons + export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn} + + # resolve links - $0 may be a softlink + export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}" + + # some Java parameters + # export JAVA_HOME=/home/y/libexec/jdk1.6.0/ + if [ "$JAVA_HOME" != "" ]; then + #echo "run java in $JAVA_HOME" + JAVA_HOME=$JAVA_HOME + fi + + if [ "$JAVA_HOME" = "" ]; then + echo "Error: JAVA_HOME is not set." + exit 1 + fi + + JAVA=$JAVA_HOME/bin/java + JAVA_HEAP_MAX=-Xmx1000m + + # For setting YARN specific HEAP sizes please use this + # Parameter and set appropriately + YARN_HEAPSIZE={{yarn_heapsize}} + + # check envvars which might override default args + if [ "$YARN_HEAPSIZE" != "" ]; then + JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m" + fi + + # Resource Manager specific parameters + + # Specify the max Heapsize for the ResourceManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either YARN_OPTS + # and/or YARN_RESOURCEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_RESOURCEMANAGER_HEAPSIZE={{resourcemanager_heapsize}} + + # Specify the JVM options to be used when starting the ResourceManager. + # These options will be appended to the options specified as YARN_OPTS + # and therefore may override any similar flags set in YARN_OPTS + #export YARN_RESOURCEMANAGER_OPTS= + # Node Manager specific parameters + + # Specify the max Heapsize for the NodeManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1000. + # This value will be overridden by an Xmx setting specified in either YARN_OPTS + # and/or YARN_NODEMANAGER_OPTS. + # If not specified, the default value will be picked from either YARN_HEAPMAX + # or JAVA_HEAP_MAX with YARN_HEAPMAX as the preferred option of the two. + export YARN_NODEMANAGER_HEAPSIZE={{nodemanager_heapsize}} + + # Specify the max Heapsize for the HistoryManager using a numerical value + # in the scale of MB. For example, to specify an jvm option of -Xmx1000m, set + # the value to 1024. + # This value will be overridden by an Xmx setting specified in eith
ambari git commit: AMBARI-11834. Add Service Wizard: disable Deploy button after click (after Kerberos enabling) (akovalenko)
Repository: ambari Updated Branches: refs/heads/trunk cbd1d9480 -> cd2e39790 AMBARI-11834. Add Service Wizard: disable Deploy button after click (after Kerberos enabling) (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd2e3979 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd2e3979 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd2e3979 Branch: refs/heads/trunk Commit: cd2e39790c0c68060f9e54df548807b0be71c778 Parents: cbd1d94 Author: Aleksandr Kovalenko Authored: Wed Jun 10 16:22:36 2015 +0300 Committer: Aleksandr Kovalenko Committed: Wed Jun 10 18:32:57 2015 +0300 -- .../app/controllers/main/admin/kerberos.js | 6 +- .../main/admin/kerberos/step3_controller.js | 11 +-- .../app/controllers/wizard/step8_controller.js | 86 +++--- ambari-web/app/mixins.js| 1 - .../mixins/wizard/wizardDeployProgressView.js | 96 .../wizard/wizardProgressPageController.js | 13 ++- ambari-web/app/utils/ajax/ajax.js | 22 ++--- ambari-web/app/views/wizard/step8_view.js | 10 +- .../test/controllers/wizard/step8_test.js | 18 ++-- ambari-web/test/views/wizard/step8_view_test.js | 67 -- 10 files changed, 108 insertions(+), 222 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd2e3979/ambari-web/app/controllers/main/admin/kerberos.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos.js b/ambari-web/app/controllers/main/admin/kerberos.js index ecd79a6..2bc7cfd 100644 --- a/ambari-web/app/controllers/main/admin/kerberos.js +++ b/ambari-web/app/controllers/main/admin/kerberos.js @@ -210,7 +210,6 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ * @param data {object} * @param opt {object} * @param params {object} - * @returns {App.ModalPopup|undefined} */ runSecurityCheckSuccess: function (data, opt, params) { //TODO correct check @@ -366,7 +365,7 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ return configProperties; }, - getKDCSessionState: function(callback) { + getKDCSessionState: function(callback, kdcCancelHandler) { if (this.get('securityEnabled')) { App.ajax.send({ name: 'kerberos.session.state', @@ -374,7 +373,8 @@ App.MainAdminKerberosController = App.KerberosWizardStep4Controller.extend({ data: { callback: callback }, -success: 'checkState' +success: 'checkState', +kdcCancelHandler: kdcCancelHandler }) } else { callback(); http://git-wip-us.apache.org/repos/asf/ambari/blob/cd2e3979/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js -- diff --git a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js index 8946481..b51f8ec 100644 --- a/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js +++ b/ambari-web/app/controllers/main/admin/kerberos/step3_controller.js @@ -52,11 +52,6 @@ App.KerberosWizardStep3Controller = App.KerberosProgressPageController.extend({ }); }, - onKDCCancel: function() { -App.router.get(this.get('content.controllerName')).setStepsEnable(); -this.get('tasks').objectAt(this.get('currentTaskId')).set('status', 'FAILED'); - }, - getKerberosClientState: function() { return App.ajax.send({ name: 'common.service_component.info', @@ -70,12 +65,16 @@ App.KerberosWizardStep3Controller = App.KerberosProgressPageController.extend({ }, testKerberos: function() { +var self = this; App.ajax.send({ 'name': 'service.item.smoke', 'sender': this, 'success': 'startPolling', 'error': 'onTestKerberosError', - 'kdcCancelHandler': 'onKDCCancel', + 'kdcCancelHandler': function() { +App.router.get(self.get('content.controllerName')).setStepsEnable(); +self.get('tasks').objectAt(self.get('currentTaskId')).set('status', 'FAILED'); + }, 'data': { 'serviceName': this.serviceName, 'displayName': App.format.role(this.serviceName), http://git-wip-us.apache.org/repos/asf/ambari/blob/cd2e3979/ambari-web/app/controllers/wizard/step8_controller.js -- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 6aef9bc..b44f900 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizar
[1/2] ambari git commit: AMBARI-11838. HdfsResource rearly fails on heavy loaded machines (aonishuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 49c7c9301 -> fa6946093 refs/heads/trunk fd4290e05 -> cbd1d9480 AMBARI-11838. HdfsResource rearly fails on heavy loaded machines (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cbd1d948 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cbd1d948 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cbd1d948 Branch: refs/heads/trunk Commit: cbd1d94805a81dd1652ac47507dd207d2db54a09 Parents: fd4290e Author: Andrew Onishuk Authored: Wed Jun 10 17:54:29 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 17:54:29 2015 +0300 -- .../resource_management/TestExecuteResource.py | 81 +--- .../resource_management/TestGroupResource.py| 25 ++- .../resource_management/TestUserResource.py | 49 ++--- .../resource_management/core/exceptions.py | 2 +- .../core/providers/system.py| 37 +--- .../core/resources/system.py| 10 + .../python/resource_management/core/shell.py| 187 +-- .../python/resource_management/core/sudo.py | 20 +- .../libraries/providers/hdfs_resource.py| 11 +- .../libraries/script/config_dictionary.py | 16 +- .../HDFS/2.1.0.2.0/package/scripts/namenode.py | 5 +- .../custom_actions/TestInstallPackages.py | 10 +- 12 files changed, 291 insertions(+), 162 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cbd1d948/ambari-agent/src/test/python/resource_management/TestExecuteResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py index 59d7e4c..04244e9 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py @@ -30,18 +30,23 @@ import os from resource_management import Fail import grp import pwd +import select @patch.object(System, "os_family", new='redhat') class TestExecuteResource(TestCase): + @patch.object(os, "read") + @patch.object(select, "select") @patch.object(logging.Logger, "info") @patch.object(subprocess, "Popen") - def test_attribute_logoutput(self, popen_mock, info_mock): + def test_attribute_logoutput(self, popen_mock, info_mock, select_mock, os_read_mock): subproc_mock = MagicMock() +subproc_mock.wait.return_value = MagicMock() +subproc_mock.stdout = MagicMock() subproc_mock.returncode = 0 -subproc_mock.stdout.readline = MagicMock(side_effect = ['OK']) -subproc_mock.communicate.side_effect = [["1"], ["2"]] popen_mock.return_value = subproc_mock +select_mock.return_value = ([subproc_mock.stdout], None, None) +os_read_mock.return_value = None with Environment("/") as env: Execute('echo "1"', @@ -82,14 +87,18 @@ class TestExecuteResource(TestCase): exists_mock.assert_called_with("/must/be/created") self.assertEqual(subproc_mock.call_count, 0) + @patch.object(os, "read") + @patch.object(select, "select") @patch.object(subprocess, "Popen") - def test_attribute_path(self, popen_mock): + def test_attribute_path(self, popen_mock, select_mock, os_read_mock): subproc_mock = MagicMock() +subproc_mock.wait.return_value = MagicMock() +subproc_mock.stdout = MagicMock() subproc_mock.returncode = 0 -subproc_mock.stdout.readline = MagicMock(side_effect = ['OK']) -subproc_mock.communicate.side_effect = [["1"]] popen_mock.return_value = subproc_mock - +select_mock.return_value = ([subproc_mock.stdout], None, None) +os_read_mock.return_value = None + with Environment("/") as env: execute_resource = Execute('echo "1"', path=["/test/one", "test/two"] @@ -97,17 +106,23 @@ class TestExecuteResource(TestCase): expected_command = ['/bin/bash', '--login', '--noprofile', '-c', 'echo "1"'] self.assertEqual(popen_mock.call_args_list[0][0][0], expected_command) + @patch.object(os, "read") + @patch.object(select, "select") @patch('time.sleep') @patch.object(subprocess, "Popen") - def test_attribute_try_sleep_tries(self, popen_mock, time_mock): + def test_attribute_try_sleep_tries(self, popen_mock, time_mock, select_mock, os_read_mock): expected_call = "call('Retrying after %d seconds. Reason: %s', 1, 'Fail')" - + subproc_mock_one = MagicMock() subproc_mock_one.returncode = 1 +subproc_mock_one.stdout = MagicMock() subproc_mock_zero = MagicMock() +subproc_mock_zero.stdout = MagicMock() subproc_mock_zero.returncode = 0 #subproc_mock.stdout.readline = MagicMock
[2/2] ambari git commit: AMBARI-11838. HdfsResource rearly fails on heavy loaded machines (aonishuk)
AMBARI-11838. HdfsResource rearly fails on heavy loaded machines (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fa694609 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fa694609 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fa694609 Branch: refs/heads/branch-2.1 Commit: fa694609375059c3856ed473078bf30652992d36 Parents: 49c7c93 Author: Andrew Onishuk Authored: Wed Jun 10 17:54:31 2015 +0300 Committer: Andrew Onishuk Committed: Wed Jun 10 17:54:31 2015 +0300 -- .../resource_management/TestExecuteResource.py | 81 +--- .../resource_management/TestGroupResource.py| 25 ++- .../resource_management/TestUserResource.py | 49 ++--- .../resource_management/core/exceptions.py | 2 +- .../core/providers/system.py| 37 +--- .../core/resources/system.py| 10 + .../python/resource_management/core/shell.py| 187 +-- .../python/resource_management/core/sudo.py | 20 +- .../libraries/providers/hdfs_resource.py| 11 +- .../libraries/script/config_dictionary.py | 16 +- .../HDFS/2.1.0.2.0/package/scripts/namenode.py | 5 +- .../custom_actions/TestInstallPackages.py | 10 +- 12 files changed, 291 insertions(+), 162 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fa694609/ambari-agent/src/test/python/resource_management/TestExecuteResource.py -- diff --git a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py index 59d7e4c..04244e9 100644 --- a/ambari-agent/src/test/python/resource_management/TestExecuteResource.py +++ b/ambari-agent/src/test/python/resource_management/TestExecuteResource.py @@ -30,18 +30,23 @@ import os from resource_management import Fail import grp import pwd +import select @patch.object(System, "os_family", new='redhat') class TestExecuteResource(TestCase): + @patch.object(os, "read") + @patch.object(select, "select") @patch.object(logging.Logger, "info") @patch.object(subprocess, "Popen") - def test_attribute_logoutput(self, popen_mock, info_mock): + def test_attribute_logoutput(self, popen_mock, info_mock, select_mock, os_read_mock): subproc_mock = MagicMock() +subproc_mock.wait.return_value = MagicMock() +subproc_mock.stdout = MagicMock() subproc_mock.returncode = 0 -subproc_mock.stdout.readline = MagicMock(side_effect = ['OK']) -subproc_mock.communicate.side_effect = [["1"], ["2"]] popen_mock.return_value = subproc_mock +select_mock.return_value = ([subproc_mock.stdout], None, None) +os_read_mock.return_value = None with Environment("/") as env: Execute('echo "1"', @@ -82,14 +87,18 @@ class TestExecuteResource(TestCase): exists_mock.assert_called_with("/must/be/created") self.assertEqual(subproc_mock.call_count, 0) + @patch.object(os, "read") + @patch.object(select, "select") @patch.object(subprocess, "Popen") - def test_attribute_path(self, popen_mock): + def test_attribute_path(self, popen_mock, select_mock, os_read_mock): subproc_mock = MagicMock() +subproc_mock.wait.return_value = MagicMock() +subproc_mock.stdout = MagicMock() subproc_mock.returncode = 0 -subproc_mock.stdout.readline = MagicMock(side_effect = ['OK']) -subproc_mock.communicate.side_effect = [["1"]] popen_mock.return_value = subproc_mock - +select_mock.return_value = ([subproc_mock.stdout], None, None) +os_read_mock.return_value = None + with Environment("/") as env: execute_resource = Execute('echo "1"', path=["/test/one", "test/two"] @@ -97,17 +106,23 @@ class TestExecuteResource(TestCase): expected_command = ['/bin/bash', '--login', '--noprofile', '-c', 'echo "1"'] self.assertEqual(popen_mock.call_args_list[0][0][0], expected_command) + @patch.object(os, "read") + @patch.object(select, "select") @patch('time.sleep') @patch.object(subprocess, "Popen") - def test_attribute_try_sleep_tries(self, popen_mock, time_mock): + def test_attribute_try_sleep_tries(self, popen_mock, time_mock, select_mock, os_read_mock): expected_call = "call('Retrying after %d seconds. Reason: %s', 1, 'Fail')" - + subproc_mock_one = MagicMock() subproc_mock_one.returncode = 1 +subproc_mock_one.stdout = MagicMock() subproc_mock_zero = MagicMock() +subproc_mock_zero.stdout = MagicMock() subproc_mock_zero.returncode = 0 #subproc_mock.stdout.readline = MagicMock(side_effect = [Fail("Fail"), "OK"]) popen_mock.side_effect = [subproc_mock_one, subproc_mock_zero] +select_mock.
ambari git commit: AMBARI-11837. Simple insert takes up 6 slots with tez: mapreduce.input.fileinputformat.split.minsize=1 should be changed.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/trunk 247a72cb1 -> fd4290e05 AMBARI-11837. Simple insert takes up 6 slots with tez: mapreduce.input.fileinputformat.split.minsize=1 should be changed.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fd4290e0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fd4290e0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fd4290e0 Branch: refs/heads/trunk Commit: fd4290e054f10b55c218d6fee75ab523be7ea39a Parents: 247a72c Author: Vitaly Brodetskyi Authored: Wed Jun 10 09:20:33 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 09:20:33 2015 +0300 -- .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/fd4290e0/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index f4e4b25..1ede48c 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -354,6 +354,13 @@ limitations under the License. + mapreduce.input.fileinputformat.split.minsize + 100 + The minimum size chunk that map input should be split into. + Note that some file formats may have minimum split sizes that take priority over this setting. + + + hive.default.fileformat TextFile Default file format for CREATE TABLE statement.
ambari git commit: AMBARI-11837. Simple insert takes up 6 slots with tez: mapreduce.input.fileinputformat.split.minsize=1 should be changed.(vbrodetskyi)
Repository: ambari Updated Branches: refs/heads/branch-2.1 6dbaee423 -> 49c7c9301 AMBARI-11837. Simple insert takes up 6 slots with tez: mapreduce.input.fileinputformat.split.minsize=1 should be changed.(vbrodetskyi) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/49c7c930 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/49c7c930 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/49c7c930 Branch: refs/heads/branch-2.1 Commit: 49c7c9301fcae6a51dddab843f40134118a7df00 Parents: 6dbaee4 Author: Vitaly Brodetskyi Authored: Wed Jun 10 09:21:48 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 09:21:48 2015 +0300 -- .../HIVE/0.12.0.2.0/configuration/hive-site.xml | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/49c7c930/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml -- diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml index f4e4b25..1ede48c 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml +++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/configuration/hive-site.xml @@ -354,6 +354,13 @@ limitations under the License. + mapreduce.input.fileinputformat.split.minsize + 100 + The minimum size chunk that map input should be split into. + Note that some file formats may have minimum split sizes that take priority over this setting. + + + hive.default.fileformat TextFile Default file format for CREATE TABLE statement.
ambari git commit: Revert "AMBARI-11785. Ambari upgrade to 2.1 hangs.Part 2.(vbrodetskyi)"
Repository: ambari Updated Branches: refs/heads/branch-2.1 3d5c4cea0 -> 6dbaee423 Revert "AMBARI-11785. Ambari upgrade to 2.1 hangs.Part 2.(vbrodetskyi)" Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6dbaee42 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6dbaee42 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6dbaee42 Branch: refs/heads/branch-2.1 Commit: 6dbaee4237a71281f3bab43c94e10521b77dda66 Parents: 3d5c4ce Author: Vitaly Brodetskyi Authored: Wed Jun 10 08:21:19 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 08:21:19 2015 +0300 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/6dbaee42/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 98d84e7..85cf39a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1068,7 +1068,8 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { String source = oozieWebUIAlertDefinitionEntity.getSource(); JsonObject rootJson = new JsonParser().parse(source).getAsJsonObject(); rootJson.get("uri").getAsJsonObject().remove("http"); -rootJson.get("uri").getAsJsonObject().addProperty("http", "{{oozie-site/oozie.base.url}}/?user.name=oozie"); +rootJson.get("uri").getAsJsonObject().addProperty("http", + "{{oozie-site/oozie.base.url}}/?user.name={{oozie-env/oozie_user}}"); // save the changes updateAlertDefinitionEntitySource("oozie_server_webui", rootJson.toString());
ambari git commit: Revert "AMBARI-11785. Ambari upgrade to 2.1 hangs.Part 2.(vbrodetskyi)"
Repository: ambari Updated Branches: refs/heads/trunk cd869694f -> 247a72cb1 Revert "AMBARI-11785. Ambari upgrade to 2.1 hangs.Part 2.(vbrodetskyi)" Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/247a72cb Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/247a72cb Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/247a72cb Branch: refs/heads/trunk Commit: 247a72cb1e1c2f05f1f3fd004aeb1de9c13e47d7 Parents: cd86969 Author: Vitaly Brodetskyi Authored: Wed Jun 10 08:19:53 2015 +0300 Committer: Vitaly Brodetskyi Committed: Wed Jun 10 08:19:53 2015 +0300 -- .../java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/247a72cb/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java index 98d84e7..85cf39a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog210.java @@ -1068,7 +1068,8 @@ public class UpgradeCatalog210 extends AbstractUpgradeCatalog { String source = oozieWebUIAlertDefinitionEntity.getSource(); JsonObject rootJson = new JsonParser().parse(source).getAsJsonObject(); rootJson.get("uri").getAsJsonObject().remove("http"); -rootJson.get("uri").getAsJsonObject().addProperty("http", "{{oozie-site/oozie.base.url}}/?user.name=oozie"); +rootJson.get("uri").getAsJsonObject().addProperty("http", + "{{oozie-site/oozie.base.url}}/?user.name={{oozie-env/oozie_user}}"); // save the changes updateAlertDefinitionEntitySource("oozie_server_webui", rootJson.toString());
ambari git commit: AMBARI-11835. Request in the widget "Memory Usage" returns 400-error (onechiporenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 1037ecd87 -> 3d5c4cea0 AMBARI-11835. Request in the widget "Memory Usage" returns 400-error (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d5c4cea Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d5c4cea Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d5c4cea Branch: refs/heads/branch-2.1 Commit: 3d5c4cea0a1317019042a6e8e9a45cb7b041a321 Parents: 1037ecd Author: Oleg Nechiporenko Authored: Wed Jun 10 16:21:36 2015 +0300 Committer: Oleg Nechiporenko Committed: Wed Jun 10 16:26:52 2015 +0300 -- ambari-web/app/utils/ajax/ajax.js | 2 +- ambari-web/test/utils/ajax/ajax_test.js | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d5c4cea/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 3b71219..ece938c 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1142,7 +1142,7 @@ var urls = { 'testInProduction': true }, 'dashboard.cluster_metrics.memory': { -'real': '/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}], metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}], metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]', +'real': '/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]', 'mock': '/data/cluster_metrics/memory_1hr.json', 'testInProduction': true }, http://git-wip-us.apache.org/repos/asf/ambari/blob/3d5c4cea/ambari-web/test/utils/ajax/ajax_test.js -- diff --git a/ambari-web/test/utils/ajax/ajax_test.js b/ambari-web/test/utils/ajax/ajax_test.js index 3b692bd..1c5c5ab 100644 --- a/ambari-web/test/utils/ajax/ajax_test.js +++ b/ambari-web/test/utils/ajax/ajax_test.js @@ -97,10 +97,14 @@ describe('App.ajax', function() { describe('Check "real" property for each url object', function() { var names = App.ajax.fakeGetUrlNames(); names.forEach(function(name) { - it(name, function() { + it('`' + name + '`', function() { var url = App.ajax.fakeGetUrl(name); expect(url.real).to.be.a('string'); }); + it('`' + name + '` should not contain spaces', function () { +var url = App.ajax.fakeGetUrl(name); +expect(url.real.contains(' ')).to.be.false; + }); }); });
ambari git commit: AMBARI-11835. Request in the widget "Memory Usage" returns 400-error (onechiporenko)
Repository: ambari Updated Branches: refs/heads/trunk b38e29f3d -> cd869694f AMBARI-11835. Request in the widget "Memory Usage" returns 400-error (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cd869694 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cd869694 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cd869694 Branch: refs/heads/trunk Commit: cd869694fc6d20e95c8b348a55d1a1804b977c94 Parents: b38e29f Author: Oleg Nechiporenko Authored: Wed Jun 10 16:21:36 2015 +0300 Committer: Oleg Nechiporenko Committed: Wed Jun 10 16:24:40 2015 +0300 -- ambari-web/app/utils/ajax/ajax.js | 2 +- ambari-web/test/utils/ajax/ajax_test.js | 6 +- 2 files changed, 6 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/cd869694/ambari-web/app/utils/ajax/ajax.js -- diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js index 40bbb2d..b1c6f12 100644 --- a/ambari-web/app/utils/ajax/ajax.js +++ b/ambari-web/app/utils/ajax/ajax.js @@ -1142,7 +1142,7 @@ var urls = { 'testInProduction': true }, 'dashboard.cluster_metrics.memory': { -'real': '/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}], metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}], metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]', +'real': '/clusters/{clusterName}/?fields=metrics/memory/Buffer._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Cache._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Share._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Swap._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Total._avg[{fromSeconds},{toSeconds},{stepSeconds}],metrics/memory/Use._avg[{fromSeconds},{toSeconds},{stepSeconds}]', 'mock': '/data/cluster_metrics/memory_1hr.json', 'testInProduction': true }, http://git-wip-us.apache.org/repos/asf/ambari/blob/cd869694/ambari-web/test/utils/ajax/ajax_test.js -- diff --git a/ambari-web/test/utils/ajax/ajax_test.js b/ambari-web/test/utils/ajax/ajax_test.js index 3b692bd..1c5c5ab 100644 --- a/ambari-web/test/utils/ajax/ajax_test.js +++ b/ambari-web/test/utils/ajax/ajax_test.js @@ -97,10 +97,14 @@ describe('App.ajax', function() { describe('Check "real" property for each url object', function() { var names = App.ajax.fakeGetUrlNames(); names.forEach(function(name) { - it(name, function() { + it('`' + name + '`', function() { var url = App.ajax.fakeGetUrl(name); expect(url.real).to.be.a('string'); }); + it('`' + name + '` should not contain spaces', function () { +var url = App.ajax.fakeGetUrl(name); +expect(url.real.contains(' ')).to.be.false; + }); }); });
ambari git commit: AMBARI-11831 Ambari UI not loading in testmode. (atkach)
Repository: ambari Updated Branches: refs/heads/trunk 4d18b2db2 -> b38e29f3d AMBARI-11831 Ambari UI not loading in testmode. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b38e29f3 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b38e29f3 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b38e29f3 Branch: refs/heads/trunk Commit: b38e29f3d81c731d41d65ec52abe625919401c6f Parents: 4d18b2d Author: Andrii Tkach Authored: Wed Jun 10 15:13:39 2015 +0300 Committer: Andrii Tkach Committed: Wed Jun 10 16:22:04 2015 +0300 -- .../app/assets/data/clusters/cluster.json | 46 +++ .../app/assets/data/services/components.json| 348 +++ ambari-web/app/utils/ajax/ajax.js | 2 +- 3 files changed, 395 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b38e29f3/ambari-web/app/assets/data/clusters/cluster.json -- diff --git a/ambari-web/app/assets/data/clusters/cluster.json b/ambari-web/app/assets/data/clusters/cluster.json new file mode 100644 index 000..9915b24 --- /dev/null +++ b/ambari-web/app/assets/data/clusters/cluster.json @@ -0,0 +1,46 @@ +{ + "href" : "http://ec2-23-20-184-220.compute-1.amazonaws.com:8080/api/v1/clusters/tdk?fields=Clusters";, + "Clusters" : { +"cluster_name" : "tdk", +"cluster_id" : 1, +"version" : "HDP-2.2.0", +"desired_configs" : { + "mapred-site" : { +"tag" : "version1" + }, + "hbase-site" : { +"tag" : "version1" + }, + "global" : { +"tag" : "version1" + }, + "hdfs-site" : { +"tag" : "version1" + }, + "mapred-queue-acls" : { +"tag" : "version1" + }, + "webhcat-site" : { +"tag" : "version1" + }, + "oozie-site" : { +"tag" : "version1" + }, + "hive-site" : { +"tag" : "version1" + }, + "storm-site" : { +"tag" : "version1" + }, + "tez-site" : { +"tag": "version1" + }, + "capacity-scheduler" : { +"tag" : "version1" + }, + "core-site" : { +"tag" : "version1" + } +} + } +} http://git-wip-us.apache.org/repos/asf/ambari/blob/b38e29f3/ambari-web/app/assets/data/services/components.json -- diff --git a/ambari-web/app/assets/data/services/components.json b/ambari-web/app/assets/data/services/components.json new file mode 100644 index 000..a482ce1 --- /dev/null +++ b/ambari-web/app/assets/data/services/components.json @@ -0,0 +1,348 @@ +{ + "items" : [ +{ + "ServiceInfo" : { +"service_name" : "ACCUMULO" + }, + "components" : [ +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_CLIENT" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_GC" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_MASTER" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_MONITOR" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_TRACER" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "ACCUMULO_TSERVER" + } +} + ] +}, +{ + "ServiceInfo" : { +"service_name" : "AMBARI_METRICS" + }, + "components" : [ +{ + "ServiceComponentInfo" : { +"component_name" : "METRICS_COLLECTOR" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "METRICS_MONITOR" + } +} + ] +}, +{ + "ServiceInfo" : { +"service_name" : "FALCON" + }, + "components" : [ +{ + "ServiceComponentInfo" : { +"component_name" : "FALCON_CLIENT" + } +}, +{ + "ServiceComponentInfo" : { +"component_name" : "FALCON_SERVER" + } +} + ] +}, +{ + "ServiceInfo" : { +"service_name" : "FLUME" + }, + "components" : [ +{ + "ServiceComponentInfo" : { +"component_name" : "FLUME_HANDLER" + } +} + ] +}, +{ + "ServiceInfo" : { +"service_name" : "HBASE" + }, + "components" : [ +{ + "ServiceComponentInfo" : { +"component_name" : "HBASE_CLIENT" + } +}, +{ + "ServiceComponentInfo" : {
[2/2] ambari git commit: AMBARI-11832. Oozie-site.xml need to add oozie.credentials.credentialclasses value hive2=org.apache.oozie.action.hadoop.Hive2Credentials for secure clusters (dlysnichenko)
AMBARI-11832. Oozie-site.xml need to add oozie.credentials.credentialclasses value hive2=org.apache.oozie.action.hadoop.Hive2Credentials for secure clusters (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1037ecd8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1037ecd8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1037ecd8 Branch: refs/heads/branch-2.1 Commit: 1037ecd870aa70a0839abe6c474a6da81e1bf749 Parents: 08f99fd Author: Lisnichenko Dmitro Authored: Wed Jun 10 16:14:05 2015 +0300 Committer: Lisnichenko Dmitro Committed: Wed Jun 10 16:14:57 2015 +0300 -- .../OOZIE/5.0.0.2.3/kerberos.json | 70 1 file changed, 70 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/1037ecd8/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json new file mode 100644 index 000..5d17a8f --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json @@ -0,0 +1,70 @@ +{ + "services": [ +{ + "name": "OOZIE", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "/hdfs" +} + ], + "auth_to_local_properties" : [ +"oozie-site/oozie.authentication.kerberos.name.rules" + ], + "configurations": [ +{ + "oozie-site": { +"oozie.authentication.type": "kerberos", +"oozie.service.AuthorizationService.authorization.enabled": "true", +"oozie.service.HadoopAccessorService.kerberos.enabled": "true", +"local.realm": "${realm}", +"oozie.authentication.kerberos.name.rules": "", +"oozie.credentials.credentialclasses": "hcat=org.apache.oozie.action.hadoop.HCatCredentials,hive2=org.apache.oozie.action.hadoop.Hive2Credentials" + } +} + ], + "components": [ +{ + "name": "OOZIE_SERVER", + "identities": [ +{ + "name": "oozie_server", + "principal": { +"value": "oozie/_HOST@${realm}", +"type" : "service", +"configuration": "oozie-site/oozie.service.HadoopAccessorService.kerberos.principal", +"local_username" : "${oozie-env/oozie_user}" + }, + "keytab": { +"file": "${keytab_dir}/oozie.service.keytab", +"owner": { + "name": "${oozie-env/oozie_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "oozie-site/oozie.service.HadoopAccessorService.keytab.file" + } +}, +{ + "name": "/spnego", + "principal": { +"configuration": "oozie-site/oozie.authentication.kerberos.principal" + }, + "keytab": { +"configuration": "oozie-site/oozie.authentication.kerberos.keytab" + } +} + ] +} + ] +} + ] +}
[1/2] ambari git commit: AMBARI-11832. Oozie-site.xml need to add oozie.credentials.credentialclasses value hive2=org.apache.oozie.action.hadoop.Hive2Credentials for secure clusters (dlysnichenko)
Repository: ambari Updated Branches: refs/heads/branch-2.1 08f99fdfe -> 1037ecd87 refs/heads/trunk 4c6f74aa7 -> 4d18b2db2 AMBARI-11832. Oozie-site.xml need to add oozie.credentials.credentialclasses value hive2=org.apache.oozie.action.hadoop.Hive2Credentials for secure clusters (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4d18b2db Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4d18b2db Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4d18b2db Branch: refs/heads/trunk Commit: 4d18b2db2c81b4e9b67025f6f695193ce344a090 Parents: 4c6f74a Author: Lisnichenko Dmitro Authored: Wed Jun 10 16:14:05 2015 +0300 Committer: Lisnichenko Dmitro Committed: Wed Jun 10 16:14:05 2015 +0300 -- .../OOZIE/5.0.0.2.3/kerberos.json | 70 1 file changed, 70 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4d18b2db/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json -- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json new file mode 100644 index 000..5d17a8f --- /dev/null +++ b/ambari-server/src/main/resources/common-services/OOZIE/5.0.0.2.3/kerberos.json @@ -0,0 +1,70 @@ +{ + "services": [ +{ + "name": "OOZIE", + "identities": [ +{ + "name": "/spnego" +}, +{ + "name": "/smokeuser" +}, +{ + "name": "/hdfs" +} + ], + "auth_to_local_properties" : [ +"oozie-site/oozie.authentication.kerberos.name.rules" + ], + "configurations": [ +{ + "oozie-site": { +"oozie.authentication.type": "kerberos", +"oozie.service.AuthorizationService.authorization.enabled": "true", +"oozie.service.HadoopAccessorService.kerberos.enabled": "true", +"local.realm": "${realm}", +"oozie.authentication.kerberos.name.rules": "", +"oozie.credentials.credentialclasses": "hcat=org.apache.oozie.action.hadoop.HCatCredentials,hive2=org.apache.oozie.action.hadoop.Hive2Credentials" + } +} + ], + "components": [ +{ + "name": "OOZIE_SERVER", + "identities": [ +{ + "name": "oozie_server", + "principal": { +"value": "oozie/_HOST@${realm}", +"type" : "service", +"configuration": "oozie-site/oozie.service.HadoopAccessorService.kerberos.principal", +"local_username" : "${oozie-env/oozie_user}" + }, + "keytab": { +"file": "${keytab_dir}/oozie.service.keytab", +"owner": { + "name": "${oozie-env/oozie_user}", + "access": "r" +}, +"group": { + "name": "${cluster-env/user_group}", + "access": "" +}, +"configuration": "oozie-site/oozie.service.HadoopAccessorService.keytab.file" + } +}, +{ + "name": "/spnego", + "principal": { +"configuration": "oozie-site/oozie.authentication.kerberos.principal" + }, + "keytab": { +"configuration": "oozie-site/oozie.authentication.kerberos.keytab" + } +} + ] +} + ] +} + ] +}
ambari git commit: AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 bf45b0a4f -> 08f99fdfe AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/08f99fdf Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/08f99fdf Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/08f99fdf Branch: refs/heads/branch-2.1 Commit: 08f99fdfefb393fcc65b0ac7dd9b4e4d1377bf3f Parents: bf45b0a Author: tbeerbower Authored: Wed Jun 10 08:39:02 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:45:12 2015 -0400 -- .../org/apache/ambari/server/orm/entities/ViewInstanceEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/08f99fdf/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index c1400d7..5044267 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -148,7 +148,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { * Indicates whether or not to alter the names of the data store entities to * avoid db reserved word conflicts. */ - @Column(name = "alter_names") + @Column(name = "alter_names", nullable = false) @Basic private Integer alterNames; @@ -216,6 +216,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { public ViewInstanceEntity() { instanceConfig = null; +this.alterNames = 1; } /**
ambari git commit: AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 87d95d299 -> 4c6f74aa7 AMBARI-11829 - Views : Cannot create instance of File View (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4c6f74aa Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4c6f74aa Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4c6f74aa Branch: refs/heads/trunk Commit: 4c6f74aa7e307ce80171216d6392829cf95aa3c6 Parents: 87d95d2 Author: tbeerbower Authored: Wed Jun 10 08:39:02 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:42:53 2015 -0400 -- .../org/apache/ambari/server/orm/entities/ViewInstanceEntity.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/4c6f74aa/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java index c1400d7..5044267 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java @@ -148,7 +148,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { * Indicates whether or not to alter the names of the data store entities to * avoid db reserved word conflicts. */ - @Column(name = "alter_names") + @Column(name = "alter_names", nullable = false) @Basic private Integer alterNames; @@ -216,6 +216,7 @@ public class ViewInstanceEntity implements ViewInstanceDefinition { public ViewInstanceEntity() { instanceConfig = null; +this.alterNames = 1; } /**
ambari git commit: AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower)
Repository: ambari Updated Branches: refs/heads/branch-2.1 3d536e5b8 -> bf45b0a4f AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bf45b0a4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bf45b0a4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bf45b0a4 Branch: refs/heads/branch-2.1 Commit: bf45b0a4fe365959e6a0c1290f37feee9d75fbbd Parents: 3d536e5 Author: tbeerbower Authored: Wed Jun 10 08:34:05 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:35:11 2015 -0400 -- .../server/configuration/Configuration.java | 12 +++- .../apache/ambari/server/view/ViewRegistry.java | 2 +- .../server/configuration/ConfigurationTest.java | 19 +++ .../ambari/server/view/ViewRegistryTest.java | 18 -- 4 files changed, 43 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index 318e8b3..69d48e3 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -69,6 +69,8 @@ public class Configuration { public static final String VIEWS_DIR_DEFAULT = "/var/lib/ambari-server/resources/views"; public static final String VIEWS_VALIDATE = "views.validate"; public static final String VIEWS_VALIDATE_DEFAULT = "false"; + public static final String VIEWS_REMOVE_UNDEPLOYED = "views.remove.undeployed"; + public static final String VIEWS_REMOVE_UNDEPLOYED_DEFAULT = "false"; public static final String WEBAPP_DIR = "webapp.dir"; public static final String BOOTSTRAP_SCRIPT = "bootstrap.script"; public static final String BOOTSTRAP_SCRIPT_DEFAULT = "/usr/bin/ambari_bootstrap"; @@ -734,9 +736,17 @@ public class Configuration { * @return true if view validation is enabled */ public boolean isViewValidationEnabled() { -return "true".equalsIgnoreCase(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); +return Boolean.parseBoolean(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); } + /** + * Determine whether or not a view that has been undeployed (archive deleted) should be removed from the database. + * + * @return true if undeployed views should be removed + */ + public boolean isViewRemoveUndeployedEnabled() { +return Boolean.parseBoolean(properties.getProperty(VIEWS_REMOVE_UNDEPLOYED, VIEWS_REMOVE_UNDEPLOYED_DEFAULT)); + } /** * @return conventional Java version number, e.g. 7. http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 3ee2c5a..61b9327 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -1510,7 +1510,7 @@ public class ViewRegistry { } } - if (removeUndeployed) { + if (configuration.isViewRemoveUndeployedEnabled()) { removeUndeployedViews(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/bf45b0a4/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 0823f99..70ab3b6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -341,6 +341,25 @@ public class ConfigurationTest { } @Test + public void testIsViewRemoveUndeployedEnabled() throws Exception { +final Properties ambariProperties = new Properties(); +Configuration configuration = new Configuration(ambariProperties); +Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled
ambari git commit: AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower)
Repository: ambari Updated Branches: refs/heads/trunk 9d9ec5e21 -> 87d95d299 AMBARI-11818 - Views : By default do not delete view data when View archive is removed (tbeerbower) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/87d95d29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/87d95d29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/87d95d29 Branch: refs/heads/trunk Commit: 87d95d299b19ed4f2bcb15e0e39e14b5661ce5b0 Parents: 9d9ec5e Author: tbeerbower Authored: Wed Jun 10 08:34:05 2015 -0400 Committer: tbeerbower Committed: Wed Jun 10 08:34:05 2015 -0400 -- .../server/configuration/Configuration.java | 12 +++- .../apache/ambari/server/view/ViewRegistry.java | 2 +- .../server/configuration/ConfigurationTest.java | 19 +++ .../ambari/server/view/ViewRegistryTest.java | 18 -- 4 files changed, 43 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java index f62ab64..dc6089a 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java @@ -69,6 +69,8 @@ public class Configuration { public static final String VIEWS_DIR_DEFAULT = "/var/lib/ambari-server/resources/views"; public static final String VIEWS_VALIDATE = "views.validate"; public static final String VIEWS_VALIDATE_DEFAULT = "false"; + public static final String VIEWS_REMOVE_UNDEPLOYED = "views.remove.undeployed"; + public static final String VIEWS_REMOVE_UNDEPLOYED_DEFAULT = "false"; public static final String WEBAPP_DIR = "webapp.dir"; public static final String BOOTSTRAP_SCRIPT = "bootstrap.script"; public static final String BOOTSTRAP_SCRIPT_DEFAULT = "/usr/bin/ambari_bootstrap"; @@ -730,9 +732,17 @@ public class Configuration { * @return true if view validation is enabled */ public boolean isViewValidationEnabled() { -return "true".equalsIgnoreCase(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); +return Boolean.parseBoolean(properties.getProperty(VIEWS_VALIDATE, VIEWS_VALIDATE_DEFAULT)); } + /** + * Determine whether or not a view that has been undeployed (archive deleted) should be removed from the database. + * + * @return true if undeployed views should be removed + */ + public boolean isViewRemoveUndeployedEnabled() { +return Boolean.parseBoolean(properties.getProperty(VIEWS_REMOVE_UNDEPLOYED, VIEWS_REMOVE_UNDEPLOYED_DEFAULT)); + } /** * @return conventional Java version number, e.g. 7. http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java index 3ee2c5a..61b9327 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java @@ -1510,7 +1510,7 @@ public class ViewRegistry { } } - if (removeUndeployed) { + if (configuration.isViewRemoveUndeployedEnabled()) { removeUndeployedViews(); } } http://git-wip-us.apache.org/repos/asf/ambari/blob/87d95d29/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java -- diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java index 0823f99..70ab3b6 100644 --- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java +++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java @@ -341,6 +341,25 @@ public class ConfigurationTest { } @Test + public void testIsViewRemoveUndeployedEnabled() throws Exception { +final Properties ambariProperties = new Properties(); +Configuration configuration = new Configuration(ambariProperties); +Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled()); + +
ambari git commit: AMBARI-11830 Undo-button appears on the installer step 7. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/branch-2.1 c1a1d81c4 -> 3d536e5b8 AMBARI-11830 Undo-button appears on the installer step 7. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d536e5b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d536e5b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d536e5b Branch: refs/heads/branch-2.1 Commit: 3d536e5b8025b87768f549635ed916f0a19104d9 Parents: c1a1d81 Author: aBabiichuk Authored: Wed Jun 10 14:08:09 2015 +0300 Committer: aBabiichuk Committed: Wed Jun 10 14:11:01 2015 +0300 -- ambari-web/app/mixins/common/configs/enhanced_configs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/3d536e5b/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 17c0872..cf8e60d 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -478,7 +478,9 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ } } else { cp.set('value', initialValue); - cp.set('savedValue', initialValue); + if (!this.useInitialValue(serviceName)) { +cp.set('savedValue', initialValue); + } if (dependentProperty) { this.get('_dependentConfigValues').removeObject(dependentProperty); }
ambari git commit: AMBARI-11830 Undo-button appears on the installer step 7. (ababiichuk)
Repository: ambari Updated Branches: refs/heads/trunk 52dd06d72 -> 9d9ec5e21 AMBARI-11830 Undo-button appears on the installer step 7. (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d9ec5e2 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d9ec5e2 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d9ec5e2 Branch: refs/heads/trunk Commit: 9d9ec5e219c2afecdace63cb6a22277d652e8742 Parents: 52dd06d Author: aBabiichuk Authored: Wed Jun 10 14:08:09 2015 +0300 Committer: aBabiichuk Committed: Wed Jun 10 14:08:09 2015 +0300 -- ambari-web/app/mixins/common/configs/enhanced_configs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9d9ec5e2/ambari-web/app/mixins/common/configs/enhanced_configs.js -- diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js b/ambari-web/app/mixins/common/configs/enhanced_configs.js index 17c0872..cf8e60d 100644 --- a/ambari-web/app/mixins/common/configs/enhanced_configs.js +++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js @@ -478,7 +478,9 @@ App.EnhancedConfigsMixin = Em.Mixin.create({ } } else { cp.set('value', initialValue); - cp.set('savedValue', initialValue); + if (!this.useInitialValue(serviceName)) { +cp.set('savedValue', initialValue); + } if (dependentProperty) { this.get('_dependentConfigValues').removeObject(dependentProperty); }