incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleksandr Diachenko (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-3536) Refactor to remove ActionMetadata
Date Thu, 17 Oct 2013 15:25:45 GMT

    [ https://issues.apache.org/jira/browse/AMBARI-3536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13798000#comment-13798000
] 

Oleksandr Diachenko commented on AMBARI-3536:
---------------------------------------------

* Deleted ActtionMetadata
* Updated unit-tests.

*getActions(serviceName)*
* Changed to use checking component's presence in certain stack in HeartBeatHandler. 
* Also this method was used in AmbariManagementController.getActions(Set<ActionRequest>
request). Method in AMC was unused so I deleted it.

*getClient(serviceName)*
* Used clients definitions from stacks, so now ActionMetadata.getClient(serviceName) equals
to AmbariMetaInfo.getServiceInfo(String stackName, String version, String serviceName).getClientComponent().getName().

*getServiceCheckAction(serviceName)*
* Added smoke tests names in stacks definitions, so now ActionMetadata.getClient(serviceName)
equals to AmbariMetaInfo.getServiceInfo(String stackName, String version, String serviceName).getServiceCheckName().
All services smoke tests named as <SERVICE_NAME>_SERVICE_CHECK, except ZOOKEEPER: ZOOKEEPER_QUORUM_SERVICE_CHECK,
so now AmbariMetaInfo returns smoke test name, defined in metainfo.xml if it exists, and <SERVICE_NAME>_SERVICE_CHECK
in default case.

[~ncole], please review the patch.

> Refactor to remove ActionMetadata
> ---------------------------------
>
>                 Key: AMBARI-3536
>                 URL: https://issues.apache.org/jira/browse/AMBARI-3536
>             Project: Ambari
>          Issue Type: Task
>          Components: controller
>    Affects Versions: 1.5.0
>            Reporter: Oleksandr Diachenko
>            Assignee: Oleksandr Diachenko
>             Fix For: 1.5.0
>
>
> {{ActionMetaDdata}} has hard-coded mappings of service-to-action.
> * Clients per service are already indicated in the stack
> * One client can be designated as a "service check" (a client should be able to NOT be
defined as a service check)
> * {{getActions(serviceName)}} is only called two places: one of them uses only the first
element, the other checks to see if a specific string is present in the list.  This can be
refactored.
> * {{getClient(serviceName)}} is called only one time, and is used in {{AmbariManagementControllerImpl.addServiceCheckAction(...)}}
to isolate a hostName
> * {{getServiceCheckAction(serviceName)}} is called only one time and is used to see if
any service has a SERVICE_CHECK action set.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message