You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2018/06/08 12:31:21 UTC

[ambari] branch trunk updated (c48a231 -> 43a777a)

This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


    from c48a231  AMBARI-24058 - Infra Solr: Add GC options properties (#1493)
     new b794b94  AMBARI-24056. Autostart is not working for TIMELINE_READER.  (aonishuk)
     new 43a777a  AMBARI-24056. Autostart is not working for TIMELINE_READER.  (aonishuk)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/ambari/server/agent/stomp/TopologyHolder.java  |  6 ++----
 .../ambari/server/agent/stomp/dto/TopologyComponent.java      |  1 -
 .../server/controller/AmbariManagementControllerImpl.java     | 11 ++++++++---
 3 files changed, 10 insertions(+), 8 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.

[ambari] 01/02: AMBARI-24056. Autostart is not working for TIMELINE_READER. (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit b794b9400db4e79fe8ae3a8ebc5fe0041674f0dc
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Fri Jun 8 12:16:30 2018 +0300

    AMBARI-24056. Autostart is not working for TIMELINE_READER.  (aonishuk)
---
 .../org/apache/ambari/server/agent/stomp/TopologyHolder.java  |  6 ++----
 .../ambari/server/agent/stomp/dto/TopologyComponent.java      |  1 -
 .../server/controller/AmbariManagementControllerImpl.java     | 11 ++++++++---
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/TopologyHolder.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/TopologyHolder.java
index 69a0726..7224afc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/TopologyHolder.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/TopologyHolder.java
@@ -108,11 +108,10 @@ public class TopologyHolder extends AgentClusterDataHolder<TopologyUpdateEvent>
             TopologyComponent topologyComponent = TopologyComponent.newBuilder()
                 .setComponentName(sch.getServiceComponentName())
                 .setServiceName(sch.getServiceName())
-                .setVersion(sch.getVersion())
                 .setHostIds(hostOrderIds)
                 .setComponentLevelParams(ambariManagementController.getTopologyComponentLevelParams(cl.getClusterId(), serviceName,
                     componentName, cl.getSecurityType()))
-                .setCommandParams(ambariManagementController.getTopologyCommandParams(cl.getClusterId(), serviceName, componentName))
+                .setCommandParams(ambariManagementController.getTopologyCommandParams(cl.getClusterId(), serviceName, componentName, sch))
                 .build();
             topologyComponents.add(topologyComponent);
           }
@@ -230,8 +229,7 @@ public class TopologyHolder extends AgentClusterDataHolder<TopologyUpdateEvent>
           TopologyComponent topologyComponent = TopologyComponent.newBuilder()
               .setComponentName(sch.getServiceComponentName())
               .setServiceName(sch.getServiceName())
-              .setVersion(sch.getVersion())
-              .setCommandParams(ambariManagementController.getTopologyCommandParams(cl.getClusterId(), serviceName, componentName))
+              .setCommandParams(ambariManagementController.getTopologyCommandParams(cl.getClusterId(), serviceName, componentName, sch))
               .setComponentLevelParams(ambariManagementController.getTopologyComponentLevelParams(clusterId,
                   serviceName, componentName, cl.getSecurityType()))
               .build();
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/dto/TopologyComponent.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/dto/TopologyComponent.java
index 7db45da..ef0871f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/dto/TopologyComponent.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/stomp/dto/TopologyComponent.java
@@ -187,7 +187,6 @@ public class TopologyComponent {
     return TopologyComponent.newBuilder().setComponentName(getComponentName())
         .setDisplayName(getDisplayName())
         .setServiceName(getServiceName())
-        .setVersion(getVersion())
         .setComponentLevelParams(getComponentLevelParams() == null ? null : new TreeMap<>(getComponentLevelParams()))
         .setHostIds(getHostIds() == null ? null : new HashSet<>(getHostIds()))
         .setHostNames(getHostNames() == null ? null : new HashSet<>(getHostNames()))
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 ef63ad4..539027d 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
@@ -52,6 +52,7 @@ import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_P
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_REPO_INFO;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_NAME;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_VERSION;
+import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.USER_GROUPS;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.USER_LIST;
 import static org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.masterToSlaveMappingForDecom;
@@ -779,14 +780,14 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
           .setComponentName(sch.getServiceComponentName())
           .setServiceName(sch.getServiceName())
           .setDisplayName(sc.getDisplayName())
-          .setVersion(sch.getVersion())
           .setHostIds(hostIds)
           .setHostNames(hostNames)
           .setPublicHostNames(publicHostNames)
           .setComponentLevelParams(getTopologyComponentLevelParams(cluster.getClusterId(), serviceName, componentName,
               cluster.getSecurityType()))
-          .setCommandParams(getTopologyCommandParams(cluster.getClusterId(), serviceName, componentName))
+          .setCommandParams(getTopologyCommandParams(cluster.getClusterId(), serviceName, componentName, sch))
           .build();
+
       String clusterId = Long.toString(cluster.getClusterId());
       if (!topologyUpdates.containsKey(clusterId)) {
         topologyUpdates.put(clusterId, new TopologyCluster());
@@ -5663,7 +5664,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
   }
 
   //TODO will be a need to change to multi-instance usage
-  public TreeMap<String, String> getTopologyCommandParams(Long clusterId, String serviceName, String componentName) throws AmbariException {
+  public TreeMap<String, String> getTopologyCommandParams(Long clusterId, String serviceName, String componentName, ServiceComponentHost sch) throws AmbariException {
     TreeMap<String, String> commandParams = new TreeMap<>();
     RepositoryVersionEntity repositoryVersion = getComponentRepositoryVersion(clusterId, serviceName, componentName);
     if (null != repositoryVersion) {
@@ -5697,6 +5698,10 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       commandParams.put(SCRIPT, scriptName);
       commandParams.put(SCRIPT_TYPE, script.getScriptType().toString());
     }
+    String schVersion = sch.getVersion();
+    if (!schVersion.equals("UNKNOWN")) {
+      commandParams.put(VERSION, schVersion);
+    }
     return commandParams;
   }
 

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.

[ambari] 02/02: AMBARI-24056. Autostart is not working for TIMELINE_READER. (aonishuk)

Posted by ao...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 43a777a368bbddb29e15aa7650cced077b5a7fb4
Author: Andrew Onishuk <ao...@hortonworks.com>
AuthorDate: Fri Jun 8 14:24:42 2018 +0300

    AMBARI-24056. Autostart is not working for TIMELINE_READER.  (aonishuk)
---
 .../apache/ambari/server/controller/AmbariManagementControllerImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 539027d..3eca387 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
@@ -52,9 +52,9 @@ import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_P
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.SERVICE_REPO_INFO;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_NAME;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.STACK_VERSION;
-import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.USER_GROUPS;
 import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.USER_LIST;
+import static org.apache.ambari.server.agent.ExecutionCommand.KeyNames.VERSION;
 import static org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.masterToSlaveMappingForDecom;
 
 import java.io.File;

-- 
To stop receiving notification emails like this one, please contact
aonishuk@apache.org.