Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-102

Heartbeat installedRoleState is returned to as size of 1 when it should be empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.1.0
    • 0.1.0
    • ambari-agent
    • None
    • Python

    Description

      Instead of sending heartbeat:

      { 
        'responseId' : 123,
        ..
        'installedRoleStates' : []
      }
      

      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:

      {
        'responseId' : 123,
        ..
      }
      

      Attachments

        Activity

          People

            eyang Eric Yang
            eyang Eric Yang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: