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

Matt commented on AMBARI-17241:
-------------------------------

{color:blue}*This may be a naive question but how will Ambari communicate the 
configuration change to the service when restart is not required?*{color}
In the prototype I implemented, I added a new method *reload* in Script.py. The 
service components has its own .py file, which implements the *reload* method 
overriding the implementation from Script.py.
When the reload button was clicked on the UI, a RELOAD command was POSTed on 
the REST API (similar to how START, STOP of individual host components are 
done) for all the host components of the service. The versioning of configs 
were handled by existing code. 
Code snippet I introduced in ajax.js:
{code}
'reload.hostComponents': {
  'real': '/clusters/{clusterName}/requests',
  'mock': '',
  'format': function (data) {
    return {
      type: 'POST',
      data: JSON.stringify({
        "RequestInfo": {
          "command": "RELOAD",
          "context": data.context,
          "operation_level": data.operation_level
        },
        "Requests/resource_filters": data.resource_filters
      })
    }
  }
}
{code}
 

{color:blue}*Also is the supports-reload or restart-required parameter expected 
to be configured by the administrator?*{color}
I do not expect admins to go change the config files. Once this feature is in, 
any service can use the feature by specifying that additional property 
<supports-reload> or <require-restart>false<require-restart> for the config, in 
addition to the command that has to be run on the component host for reload. 
I've added an example on the last page of the design proposal, in case you 
missed it. Think of it as something similar as supporting final properties, or 
editable-only-at-install properties.

> Services should be able to reload configs without requiring restart
> -------------------------------------------------------------------
>
>                 Key: AMBARI-17241
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17241
>             Project: Ambari
>          Issue Type: New Feature
>            Reporter: Matt
>            Assignee: Matt
>            Priority: Minor
>             Fix For: trunk
>
>         Attachments: AMBARI-17241-Design-Proposal.pdf
>
>
> The current implementation forces users to restart the service if any of the 
> configurations have been updated. 
> However some of the services support reloading the configuration parameters 
> during run-time which does not require restart of the service.
> This behavior should be driven by metadata defined in configuration files.
> {code}
>   <property>
>     <name>foo-bar</name>
>     <value>0</value>
>     <supports-reload>true</supports-reload>
>   </property>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to