code: def frameworkMessage(self, driver, executorId, agentId, message):
          
          
          # Take it out of base 64 encoding from Protobuf
          message = decode_data(message)
          
          log.debug('Got framework message from executor %s running on agent %s: %s',
                    executorId.value, agentId.value, message)
          message = ast.literal_eval(message)
          assert isinstance(message, dict)
          # Handle the mandatory fields of a message
          nodeAddress = message.pop('address')
          executor = self._registerNode(nodeAddress, agentId.value)
          # Handle optional message fields
          for k, v in iteritems(message):
              if k == 'nodeInfo':
                  assert isinstance(v, dict)
                  resources = [taskData for taskData in itervalues(self.runningJobMap)
                               if taskData.executorID == executorId.value]
                  requestedCores = sum(taskData.cores for taskData in resources)
                  requestedMemory = sum(taskData.memory for taskData in resources)
                  executor.nodeInfo = NodeInfo(requestedCores=requestedCores, requestedMemory=requestedMemory, **v)
                  self.executors[nodeAddress] = executor
              else:
                  raise RuntimeError("Unknown message field '%s'." % k)
docs: Invoked when an executor sends a message.