You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Sumit Mohanty (JIRA)" <ji...@apache.org> on 2013/10/29 01:02:31 UTC

[jira] [Commented] (AMBARI-3600) Add stale_configs attribute to a host_component response

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

Sumit Mohanty commented on AMBARI-3600:
---------------------------------------

Overall changes look good. The actual staleness determination logic seem complex (probably necessary) and hence needs some more comments. Some comments and questions:

* ConfigHelper.java
** isStaleConfigs() - I think we can add more details to this comment "Configs are considered stale when:". _It, as it stands today, is a little cryptic to me_ Also when we add support for ConfigGroup we need to update this comment.
** hasPropertyFor() - why is this required to determine if config is stale for a SCH?
** findChangedKeys() - We do a putAll() in this method. Does it assume that there are no over-lapping key names? Also, did we not need this only for "global" types? _In that case, we are OK as there are no over-lapping names in global_
** It seems we need a ConfigHelperTest that is dedicated for this type. There are some *relatively-complex* comparison logic in this class. The tests can also have comments in them to layout the scenarios and why it should (or should not) result in stale config 

* StackServiceResponse.java
** How do we capture this relationship, TASKTRACKER/JOBTRACKER can be related to core-site and core-site change needs to result in these guys restart?

* ambari-server/src/main/java/org/apache/ambari/server/state/ServiceInfo.java
** buildConfigLayout() - its probably not a concern but do we need a lock around populating "configLayout"? Or, at least create the layout on a temp variable and then assign it to "configLayout".

* ambari-server/src/test/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostTest.java
** testStaleConfigs(). Can we use HDP-2.0.6 for test? This test probably covers my ask for dedicated test class for ConfigHelper.

> Add stale_configs attribute to a host_component response
> --------------------------------------------------------
>
>                 Key: AMBARI-3600
>                 URL: https://issues.apache.org/jira/browse/AMBARI-3600
>             Project: Ambari
>          Issue Type: Task
>            Reporter: Nate Cole
>            Assignee: Nate Cole
>             Fix For: 1.4.2
>
>         Attachments: AMBARI-3600.patch
>
>
> Add an intelligent check to determine if the configs are stale on a host_component.  The response will have like the following:
> {noformat}
> {
>   "href" : "http://localhost:8080/api/v1/clusters/c1/hosts/h1/host_components/DATANODE?fields=HostRoles/stale_configs",
>   "HostRoles" : {
>     "cluster_name" : "c1",
>     "component_name" : "DATANODE",
>     "host_name" : "h1",
>     "stale_configs" : true
>   }
> }
> {noformat}



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