MCPcopy Create free account
hub / github.com/alibaba/GraphScope / connect_coordinator

Function connect_coordinator

python/graphscope/gsctl/impl/common.py:27–45  ·  view source on GitHub ↗
(coordinator_endpoint: str)

Source from the content-addressed store, hash-verified

25
26
27def connect_coordinator(coordinator_endpoint: str) -> RunningDeploymentInfo:
28 with graphscope.flex.rest.ApiClient(
29 graphscope.flex.rest.Configuration(coordinator_endpoint)
30 ) as api_client:
31 api_instance = graphscope.flex.rest.DeploymentApi(api_client)
32 deployment_info = api_instance.get_deployment_info()
33 # coordinator connected, set the context
34 flex = {
35 "engine": deployment_info.engine,
36 "storage": deployment_info.storage,
37 "frontend": deployment_info.frontend,
38 }
39 context = Context(
40 flex=flex,
41 coordinator_endpoint=coordinator_endpoint,
42 )
43 config = load_gs_config()
44 config.set_and_write(context)
45 return deployment_info
46
47
48def disconnect_coordinator() -> Union[None, Context]:

Callers 4

get_command_collectionFunction · 0.90
connectFunction · 0.90
setup_classMethod · 0.90
setup_classMethod · 0.90

Calls 5

ContextClass · 0.90
load_gs_configFunction · 0.90
set_and_writeMethod · 0.80
ConfigurationMethod · 0.45
get_deployment_infoMethod · 0.45

Tested by 2

setup_classMethod · 0.72
setup_classMethod · 0.72