[ 
https://issues.apache.org/jira/browse/AMBARI-102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Yang resolved AMBARI-102.
------------------------------

    Resolution: Fixed
    
> Heartbeat installedRoleState is returned to as size of 1 when it should be 
> empty
> --------------------------------------------------------------------------------
>
>                 Key: AMBARI-102
>                 URL: https://issues.apache.org/jira/browse/AMBARI-102
>             Project: Ambari
>          Issue Type: Bug
>          Components: agent
>    Affects Versions: 0.1.0
>         Environment: Python
>            Reporter: Eric Yang
>            Assignee: Eric Yang
>             Fix For: 0.1.0
>
>
> Instead of sending heartbeat:
> {noformat}
> { 
>   'responseId' : 123,
>   ..
>   'installedRoleStates' : []
> }
> {noformat}
> In the java side, installedRoleStates is serialized and have object of size 
> of 1.  This is because Jersey already creates empty object to hold the array 
> prior to serialize the empty array.  This leads to result of 1 element 
> instead of 0.
> The workaround is to not sending empty array as part of heartbeat message, 
> hence the heartbeat looks like:
> {noformat}
> {
>   'responseId' : 123,
>   ..
> }
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to