python/ray/state.py
def node_table(self):
        """Fetch and parse the Gcs node info table.

        Returns:
            Information about the node in the cluster.
        """
        self._check_connected()

        node_table = self.global_state_accessor.get_node_table()

        results = []
        for node_info_item in node_table:
            item = gcs_utils.GcsNodeInfo.FromString(node_info_item)
            node_info = {
                "NodeID": ray._private.utils.binary_to_hex(item.node_id),
                "Alive": item.state
                == gcs_utils.GcsNodeInfo.GcsNodeState.Value("ALIVE"),
                "NodeManagerAddress": item.node_manager_address,
                "NodeManagerHostname": item.node_manager_hostname,
                "NodeManagerPort": item.node_manager_port,
                "ObjectManagerPort": item.object_manager_port,
                "ObjectStoreSocketName": item.object_store_socket_name,
                "RayletSocketName": item.raylet_socket_name,
                "MetricsExportPort": item.metrics_export_port,
                "NodeName": item.node_name,
            }
            node_info["alive"] = node_info["Alive"]
            node_info["Resources"] = (
                self.node_resource_table(node_info["NodeID"])
                if node_info["Alive"]
                else {}
            )
            results.append(node_info)
        return results
Fetch and parse the Gcs node info table.

        Returns:
            Information about the node in the cluster.
        
Fetch and parse the Gcs node info table.
Fetch and parse the Gcs node info table .
def node_table(self):
        self._check_connected()
        node_table = self.global_state_accessor.get_node_table()
        results = []
        for node_info_item in node_table:
            item = gcs_utils.GcsNodeInfo.FromString(node_info_item)
            node_info = {
                "NodeID": ray._private.utils.binary_to_hex(item.node_id),
                "Alive": item.state
                == gcs_utils.GcsNodeInfo.GcsNodeState.Value("ALIVE"),
                "NodeManagerAddress": item.node_manager_address,
                "NodeManagerHostname": item.node_manager_hostname,
                "NodeManagerPort": item.node_manager_port,
                "ObjectManagerPort": item.object_manager_port,
                "ObjectStoreSocketName": item.object_store_socket_name,
                "RayletSocketName": item.raylet_socket_name,
                "MetricsExportPort": item.metrics_export_port,
                "NodeName": item.node_name,
            }
            node_info["alive"] = node_info["Alive"]
            node_info["Resources"] = (
                self.node_resource_table(node_info["NodeID"])
                if node_info["Alive"]
                else {}
            )
            results.append(node_info)
        return results
def node_table ( self ) : self . _check_connected ( ) node_table = self . global_state_accessor . get_node_table ( ) results = [ ] for node_info_item in node_table : item = gcs_utils . GcsNodeInfo . FromString ( node_info_item ) node_info = { "NodeID" : ray . _private . utils . binary_to_hex ( item . node_id ) , "Alive" : item . state == gcs_utils . GcsNodeInfo . GcsNodeState . Value ( "ALIVE" ) , "NodeManagerAddress" : item . node_manager_address , "NodeManagerHostname" : item . node_manager_hostname , "NodeManagerPort" : item . node_manager_port , "ObjectManagerPort" : item . object_manager_port , "ObjectStoreSocketName" : item . object_store_socket_name , "RayletSocketName" : item . raylet_socket_name , "MetricsExportPort" : item . metrics_export_port , "NodeName" : item . node_name , } node_info [ "alive" ] = node_info [ "Alive" ] node_info [ "Resources" ] = ( self . node_resource_table ( node_info [ "NodeID" ] ) if node_info [ "Alive" ] else { } ) results . append ( node_info ) return results
Fetch and parse the Gcs node info table.
Fetch and parse the Gcs node info table .
"""Fetch and parse the Gcs node info table.

        Returns:
            Information about the node in the cluster.
        """
Information about the node in the cluster.
Information about the node in the cluster .
self