dashboard/state_aggregator.py
async def list_objects(self, *, option: ListApiOptions) -> dict:
        """List all object information from the cluster.

        Returns:
            {object_id -> object_data_in_dict}
            object_data_in_dict's schema is in ObjectState
        """
        replies = await asyncio.gather(
            *[
                self._client.get_object_info(node_id, timeout=option.timeout)
                for node_id in self._client.get_all_registered_raylet_ids()
            ]
        )

        worker_stats = []
        for reply in replies:
            for core_worker_stat in reply.core_workers_stats:
                # NOTE: Set preserving_proto_field_name=False here because
                # `construct_memory_table` requires a dictionary that has
                # modified protobuf name
                # (e.g., workerId instead of worker_id) as a key.
                worker_stats.append(
                    self._message_to_dict(
                        message=core_worker_stat,
                        fields_to_decode=["object_id"],
                        preserving_proto_field_name=False,
                    )
                )

        result = []
        memory_table = memory_utils.construct_memory_table(worker_stats)
        for entry in memory_table.table:
            data = entry.as_dict()
            # `construct_memory_table` returns object_ref field which is indeed
            # object_id. We do transformation here.
            # TODO(sang): Refactor `construct_memory_table`.
            data["object_id"] = data["object_ref"]
            del data["object_ref"]
            data = filter_fields(data, ObjectState)
            result.append(data)

        # Sort to make the output deterministic.
        result.sort(key=lambda entry: entry["object_id"])
        return {d["object_id"]: d for d in islice(result, option.limit)}
List all object information from the cluster.

        Returns:
            {object_id -> object_data_in_dict}
            object_data_in_dict's schema is in ObjectState
        
List all object information from the cluster.
List all object information from the cluster .
async def list_objects(self, *, option: ListApiOptions) -> dict:
        replies = await asyncio.gather(
            *[
                self._client.get_object_info(node_id, timeout=option.timeout)
                for node_id in self._client.get_all_registered_raylet_ids()
            ]
        )
        worker_stats = []
        for reply in replies:
            for core_worker_stat in reply.core_workers_stats:
                worker_stats.append(
                    self._message_to_dict(
                        message=core_worker_stat,
                        fields_to_decode=["object_id"],
                        preserving_proto_field_name=False,
                    )
                )
        result = []
        memory_table = memory_utils.construct_memory_table(worker_stats)
        for entry in memory_table.table:
            data = entry.as_dict()
            data["object_id"] = data["object_ref"]
            del data["object_ref"]
            data = filter_fields(data, ObjectState)
            result.append(data)
        result.sort(key=lambda entry: entry["object_id"])
        return {d["object_id"]: d for d in islice(result, option.limit)}
async def list_objects ( self , * , option : ListApiOptions ) -> dict : replies = await asyncio . gather ( * [ self . _client . get_object_info ( node_id , timeout = option . timeout ) for node_id in self . _client . get_all_registered_raylet_ids ( ) ] ) worker_stats = [ ] for reply in replies : for core_worker_stat in reply . core_workers_stats : worker_stats . append ( self . _message_to_dict ( message = core_worker_stat , fields_to_decode = [ "object_id" ] , preserving_proto_field_name = False , ) ) result = [ ] memory_table = memory_utils . construct_memory_table ( worker_stats ) for entry in memory_table . table : data = entry . as_dict ( ) data [ "object_id" ] = data [ "object_ref" ] del data [ "object_ref" ] data = filter_fields ( data , ObjectState ) result . append ( data ) result . sort ( key = lambda entry : entry [ "object_id" ] ) return { d [ "object_id" ] : d for d in islice ( result , option . limit ) }
List all object information from the cluster.
List all object information from the cluster .
"""List all object information from the cluster.

        Returns:
            {object_id -> object_data_in_dict}
            object_data_in_dict's schema is in ObjectState
        """ # NOTE: Set preserving_proto_field_name=False here because # `construct_memory_table` requires a dictionary that has # modified protobuf name # (e.g., workerId instead of worker_id) as a key. # `construct_memory_table` returns object_ref field which is indeed # object_id. We do transformation here. # TODO(sang): Refactor `construct_memory_table`. # Sort to make the output deterministic.
{object_id -> object_data_in_dict}
object_data_in_dict's schema is in ObjectState
{ object_id - > object_data_in_dict } object_data_in_dict ' s schema is in ObjectState
self
option
ListApiOptions