50784e249660f84011aee464d163784741337d28,dashboard/datacenter.py,DataOrganizer,purge,#,34

Before Change


        //   * hostname_to_ip
        //   * ip_to_hostname
        logger.info("Purge data.")
        valid_keys = DataSource.ip_to_hostname.keys()
        for key in DataSource.node_stats.keys() - valid_keys:
            DataSource.node_stats.pop(key)

        for key in DataSource.node_physical_stats.keys() - valid_keys:

After Change


        logger.info("Purge data.")
        alive_nodes = {
            node_id
            for node_id, node_info in DataSource.nodes.items()
            if node_info["state"] == "ALIVE"
        }
        for key in DataSource.node_stats.keys() - alive_nodes:
            DataSource.node_stats.pop(key)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: ray-project/ray
Commit Name: 50784e249660f84011aee464d163784741337d28
Time: 2020-09-16
Author: fyrestone@outlook.com
File Name: dashboard/datacenter.py
Class Name: DataOrganizer
Method Name: purge


Project Name: hanxiao/bert-as-service
Commit Name: b44d6115097e2bebc4a1ecef869e04e2c60af7bb
Time: 2018-12-15
Author: hanhxiao@tencent.com
File Name: benchmark.py
Class Name:
Method Name:


Project Name: ray-project/ray
Commit Name: 05ad4c74996133f95c0d5100784ba84a3b8e8093
Time: 2020-10-27
Author: fyrestone@outlook.com
File Name: dashboard/datacenter.py
Class Name: DataOrganizer
Method Name: get_all_actors