ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole (JIRA)" <>
Subject [jira] [Commented] (AMBARI-3606) Add ConfigGroup resource provider to support API calls
Date Fri, 01 Nov 2013 14:11:20 GMT


Nate Cole commented on AMBARI-3606:

# When we updated cluster and host overrides a few months back, a requirement was to be keep
the audit trail, in the DB, of who was making config changes and when.  I can see a similar
need for ConfigGroups.  This includes a line in the "config change log file" too.
# Typically, entities are not exposed directly outside the encompassing impl - in this case,
{{}} should not have:
+      // Save
+      ConfigGroupEntity configGroupEntity = configGroup.getConfigGroupEntity();
+      configGroupEntity.setGroupName(request.getGroupName());
+      configGroupEntity.setTag(request.getTag());
+      configGroupEntity.setDescription(request.getDescription());
+      configGroup.persist();
a) This negates history if you are only updating the row (see first point) and b) even if
no history is required, then {{ConfigGroup}} should have an {{update(String, String, String)}}
instead that updates/saves the entity.  Also need cluster and possibly CG read/write locks
around it too.
# {{ConfigGroupConfigMappingDAO.removeAllByGroup(Long)}} - the argument is a Long, but the
entity call specifies Integer.class.  Same in {{ConfigGroupHostMappingDAO. removeAllByGroup(Long
# (Minor nit) Javadoc missing for new methods on {{}}, partial javadoc in {{}}

> Add ConfigGroup resource provider to support API calls
> ------------------------------------------------------
>                 Key: AMBARI-3606
>                 URL:
>             Project: Ambari
>          Issue Type: Task
>          Components: controller
>    Affects Versions: 1.4.2
>            Reporter: Siddharth Wagle
>            Assignee: Siddharth Wagle
>             Fix For: 1.4.3
>         Attachments: AMBARI-3606.patch
> Configuration group or Config group (CG) is type of Ambari resource that supports grouping
of configuration resources and host resources for a service, service component or host component.
Host is identified using the registered hostname of the host and the configuration resource
is identified by the type and tag. The CG will have a unique name and CRUD operations will
be supported on a CG using the unique group name.
> *GET*
> Get a collections of Config group resources for a service. Query example does not show
the expanded view.
> *POST*
> Create a Config group, list of hosts or configurations is not a required field. If the
configuration object contains properties, the Ambari server will create a new configuration
resource with the new type and tag or throw appropriate exception. Properties provides only
the key value pairs which have been changed. These will be applied on the cluster level configurations.
> *PUT*
> Update a config group definition, this API call would expect the object to be sent in
its entirety and will atomically update the resource. PUT call can accept properties as well.
> Delete a config group resource, this will not do a cascade delete of any other resource.

This message was sent by Atlassian JIRA

View raw message