incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Yang (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-102) Heartbeat installedRoleState is returned to as size of 1 when it should be empty
Date Tue, 25 Oct 2011 23:32:32 GMT
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

        

Mime
View raw message