You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2017/01/06 17:26:45 UTC
ambari git commit: AMBARI-19388 PERF: disabling security fails (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk accf8f1d5 -> 84cac5e4b
AMBARI-19388 PERF: disabling security fails (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/84cac5e4
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/84cac5e4
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/84cac5e4
Branch: refs/heads/trunk
Commit: 84cac5e4b01db4aeeb0f3cb26b2ea98ec4a74bc1
Parents: accf8f1
Author: Dmytro Sen <ds...@apache.org>
Authored: Fri Jan 6 19:26:40 2017 +0200
Committer: Dmytro Sen <ds...@apache.org>
Committed: Fri Jan 6 19:26:40 2017 +0200
----------------------------------------------------------------------
.../controller/AmbariCustomCommandExecutionHelper.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/84cac5e4/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 0cf46df..bdad015 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -324,6 +324,9 @@ public class AmbariCustomCommandExecutionHelper {
StackInfo stackInfo = ambariMetaInfo.getStack
(stackId.getStackName(), stackId.getStackVersion());
+ ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion();
+ boolean isUpgradeSuspended = cluster.isUpgradeSuspended();
+
CustomCommandDefinition customCommandDefinition = null;
ComponentInfo ci = serviceInfo.getComponentByName(componentName);
if(ci != null){
@@ -390,7 +393,7 @@ public class AmbariCustomCommandExecutionHelper {
hostLevelParams.put(STACK_VERSION, stackId.getStackVersion());
Map<String, DesiredConfig> desiredConfigs = cluster.getDesiredConfigs();
-
+
Set<String> userSet = configHelper.getPropertyValuesWithPropertyType(stackId, PropertyType.USER, cluster, desiredConfigs);
String userList = gson.toJson(userSet);
hostLevelParams.put(USER_LIST, userList);
@@ -442,7 +445,6 @@ public class AmbariCustomCommandExecutionHelper {
commandParams.put(SERVICE_PACKAGE_FOLDER, serviceInfo.getServicePackageFolder());
commandParams.put(HOOKS_FOLDER, stackInfo.getStackHooksFolder());
- ClusterVersionEntity effectiveClusterVersion = cluster.getEffectiveClusterVersion();
if (effectiveClusterVersion != null) {
commandParams.put(KeyNames.VERSION, effectiveClusterVersion.getRepositoryVersion().getVersion());
}
@@ -456,7 +458,7 @@ public class AmbariCustomCommandExecutionHelper {
// if there is a stack upgrade which is currently suspended then pass that
// information down with the command as some components may need to know
- if (cluster.isUpgradeSuspended()) {
+ if (isUpgradeSuspended) {
roleParams.put(KeyNames.UPGRADE_SUSPENDED, Boolean.TRUE.toString().toLowerCase());
}