Show all resource info associated with session in json format.
(self)
| 629 | |
| 630 | @property |
| 631 | def info(self): |
| 632 | """Show all resource info associated with session in json format.""" |
| 633 | info = {} |
| 634 | if self._closed: |
| 635 | info["status"] = "closed" |
| 636 | elif self._grpc_client is None or self._disconnected: |
| 637 | info["status"] = "disconnected" |
| 638 | else: |
| 639 | info["status"] = "active" |
| 640 | |
| 641 | if self._cluster_type == types_pb2.K8S: |
| 642 | info["type"] = "k8s" |
| 643 | info["engine_hosts"] = ",".join(self._pod_name_list) |
| 644 | info["namespace"] = self._config.kubernetes_launcher.namespace |
| 645 | else: |
| 646 | info["type"] = "hosts" |
| 647 | info["engine_hosts"] = self._engine_config["engine_hosts"] |
| 648 | |
| 649 | info["cluster_type"] = types_pb2.ClusterType.Name(self._cluster_type) |
| 650 | info["session_id"] = self.session_id |
| 651 | info["num_workers"] = self._config.session.num_workers |
| 652 | info["coordinator_endpoint"] = self._coordinator_endpoint |
| 653 | info["engine_config"] = self._engine_config |
| 654 | return info |
| 655 | |
| 656 | @property |
| 657 | def closed(self): |