indexify 0.3.17__py3-none-any.whl → 0.3.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- indexify/cli/cli.py +21 -18
- indexify/executor/api_objects.py +12 -0
- indexify/executor/downloader.py +4 -1
- indexify/executor/executor.py +65 -28
- indexify/executor/executor_flavor.py +7 -0
- indexify/executor/function_executor/function_executor.py +24 -11
- indexify/executor/function_executor/function_executor_state.py +9 -1
- indexify/executor/function_executor/function_executor_states_container.py +3 -1
- indexify/executor/function_executor/function_executor_status.py +2 -0
- indexify/executor/function_executor/health_checker.py +20 -2
- indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py +6 -0
- indexify/executor/function_executor/single_task_runner.py +15 -11
- indexify/executor/function_executor/task_output.py +35 -2
- indexify/executor/grpc/channel_manager.py +160 -0
- indexify/executor/grpc/completed_tasks_container.py +26 -0
- indexify/executor/grpc/function_executor_controller.py +421 -0
- indexify/executor/grpc/state_reconciler.py +33 -38
- indexify/executor/grpc/state_reporter.py +100 -39
- indexify/executor/grpc/task_controller.py +449 -0
- indexify/executor/metrics/task_reporter.py +14 -0
- indexify/executor/task_fetcher.py +8 -3
- indexify/executor/task_reporter.py +112 -4
- indexify/executor/task_runner.py +1 -0
- indexify/proto/{task_scheduler.proto → executor_api.proto} +86 -11
- indexify/proto/executor_api_pb2.py +80 -0
- indexify/proto/{task_scheduler_pb2.pyi → executor_api_pb2.pyi} +162 -7
- indexify/proto/executor_api_pb2_grpc.py +227 -0
- {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/METADATA +1 -1
- {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/RECORD +32 -28
- indexify/executor/grpc/channel_creator.py +0 -53
- indexify/proto/task_scheduler_pb2.py +0 -64
- indexify/proto/task_scheduler_pb2_grpc.py +0 -170
- /indexify/executor/grpc/metrics/{channel_creator.py → channel_manager.py} +0 -0
- {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/WHEEL +0 -0
- {indexify-0.3.17.dist-info → indexify-0.3.19.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,227 @@
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
3
|
+
import warnings
|
4
|
+
|
5
|
+
import grpc
|
6
|
+
|
7
|
+
from indexify.proto import executor_api_pb2 as indexify_dot_proto_dot_executor__api__pb2
|
8
|
+
|
9
|
+
GRPC_GENERATED_VERSION = "1.70.0"
|
10
|
+
GRPC_VERSION = grpc.__version__
|
11
|
+
_version_not_supported = False
|
12
|
+
|
13
|
+
try:
|
14
|
+
from grpc._utilities import first_version_is_lower
|
15
|
+
|
16
|
+
_version_not_supported = first_version_is_lower(
|
17
|
+
GRPC_VERSION, GRPC_GENERATED_VERSION
|
18
|
+
)
|
19
|
+
except ImportError:
|
20
|
+
_version_not_supported = True
|
21
|
+
|
22
|
+
if _version_not_supported:
|
23
|
+
raise RuntimeError(
|
24
|
+
f"The grpc package installed is at version {GRPC_VERSION},"
|
25
|
+
+ f" but the generated code in indexify/proto/executor_api_pb2_grpc.py depends on"
|
26
|
+
+ f" grpcio>={GRPC_GENERATED_VERSION}."
|
27
|
+
+ f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
|
28
|
+
+ f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
|
29
|
+
)
|
30
|
+
|
31
|
+
|
32
|
+
class ExecutorAPIStub(object):
|
33
|
+
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
34
|
+
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
35
|
+
|
36
|
+
Rename with caution. Existing clients won't find the service if the service name changes. A HTTP2 ingress proxy
|
37
|
+
might use the service name in it HTTP2 path based routing rules. See how gRPC uses service names in its HTTP2 paths
|
38
|
+
at https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.
|
39
|
+
"""
|
40
|
+
|
41
|
+
def __init__(self, channel):
|
42
|
+
"""Constructor.
|
43
|
+
|
44
|
+
Args:
|
45
|
+
channel: A grpc.Channel.
|
46
|
+
"""
|
47
|
+
self.report_executor_state = channel.unary_unary(
|
48
|
+
"/executor_api_pb.ExecutorAPI/report_executor_state",
|
49
|
+
request_serializer=indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateRequest.SerializeToString,
|
50
|
+
response_deserializer=indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateResponse.FromString,
|
51
|
+
_registered_method=True,
|
52
|
+
)
|
53
|
+
self.get_desired_executor_states = channel.unary_stream(
|
54
|
+
"/executor_api_pb.ExecutorAPI/get_desired_executor_states",
|
55
|
+
request_serializer=indexify_dot_proto_dot_executor__api__pb2.GetDesiredExecutorStatesRequest.SerializeToString,
|
56
|
+
response_deserializer=indexify_dot_proto_dot_executor__api__pb2.DesiredExecutorState.FromString,
|
57
|
+
_registered_method=True,
|
58
|
+
)
|
59
|
+
self.report_task_outcome = channel.unary_unary(
|
60
|
+
"/executor_api_pb.ExecutorAPI/report_task_outcome",
|
61
|
+
request_serializer=indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeRequest.SerializeToString,
|
62
|
+
response_deserializer=indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeResponse.FromString,
|
63
|
+
_registered_method=True,
|
64
|
+
)
|
65
|
+
|
66
|
+
|
67
|
+
class ExecutorAPIServicer(object):
|
68
|
+
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
69
|
+
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
70
|
+
|
71
|
+
Rename with caution. Existing clients won't find the service if the service name changes. A HTTP2 ingress proxy
|
72
|
+
might use the service name in it HTTP2 path based routing rules. See how gRPC uses service names in its HTTP2 paths
|
73
|
+
at https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.
|
74
|
+
"""
|
75
|
+
|
76
|
+
def report_executor_state(self, request, context):
|
77
|
+
"""Called by Executor every 5 seconds to report that it's still alive and provide its current state.
|
78
|
+
|
79
|
+
Missing 3 reports will result in the Executor being deregistered by Server.
|
80
|
+
"""
|
81
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
82
|
+
context.set_details("Method not implemented!")
|
83
|
+
raise NotImplementedError("Method not implemented!")
|
84
|
+
|
85
|
+
def get_desired_executor_states(self, request, context):
|
86
|
+
"""Called by Executor to open a stream of its desired states. When Server wants Executor to change something
|
87
|
+
it puts a message on the stream with the new desired state of the Executor.
|
88
|
+
|
89
|
+
Deprecated HTTP API is used to download the serialized graph and task inputs.
|
90
|
+
"""
|
91
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
92
|
+
context.set_details("Method not implemented!")
|
93
|
+
raise NotImplementedError("Method not implemented!")
|
94
|
+
|
95
|
+
def report_task_outcome(self, request, context):
|
96
|
+
"""Report the outcome of a task."""
|
97
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
98
|
+
context.set_details("Method not implemented!")
|
99
|
+
raise NotImplementedError("Method not implemented!")
|
100
|
+
|
101
|
+
|
102
|
+
def add_ExecutorAPIServicer_to_server(servicer, server):
|
103
|
+
rpc_method_handlers = {
|
104
|
+
"report_executor_state": grpc.unary_unary_rpc_method_handler(
|
105
|
+
servicer.report_executor_state,
|
106
|
+
request_deserializer=indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateRequest.FromString,
|
107
|
+
response_serializer=indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateResponse.SerializeToString,
|
108
|
+
),
|
109
|
+
"get_desired_executor_states": grpc.unary_stream_rpc_method_handler(
|
110
|
+
servicer.get_desired_executor_states,
|
111
|
+
request_deserializer=indexify_dot_proto_dot_executor__api__pb2.GetDesiredExecutorStatesRequest.FromString,
|
112
|
+
response_serializer=indexify_dot_proto_dot_executor__api__pb2.DesiredExecutorState.SerializeToString,
|
113
|
+
),
|
114
|
+
"report_task_outcome": grpc.unary_unary_rpc_method_handler(
|
115
|
+
servicer.report_task_outcome,
|
116
|
+
request_deserializer=indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeRequest.FromString,
|
117
|
+
response_serializer=indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeResponse.SerializeToString,
|
118
|
+
),
|
119
|
+
}
|
120
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
121
|
+
"executor_api_pb.ExecutorAPI", rpc_method_handlers
|
122
|
+
)
|
123
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
124
|
+
server.add_registered_method_handlers(
|
125
|
+
"executor_api_pb.ExecutorAPI", rpc_method_handlers
|
126
|
+
)
|
127
|
+
|
128
|
+
|
129
|
+
# This class is part of an EXPERIMENTAL API.
|
130
|
+
class ExecutorAPI(object):
|
131
|
+
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
132
|
+
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
133
|
+
|
134
|
+
Rename with caution. Existing clients won't find the service if the service name changes. A HTTP2 ingress proxy
|
135
|
+
might use the service name in it HTTP2 path based routing rules. See how gRPC uses service names in its HTTP2 paths
|
136
|
+
at https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md.
|
137
|
+
"""
|
138
|
+
|
139
|
+
@staticmethod
|
140
|
+
def report_executor_state(
|
141
|
+
request,
|
142
|
+
target,
|
143
|
+
options=(),
|
144
|
+
channel_credentials=None,
|
145
|
+
call_credentials=None,
|
146
|
+
insecure=False,
|
147
|
+
compression=None,
|
148
|
+
wait_for_ready=None,
|
149
|
+
timeout=None,
|
150
|
+
metadata=None,
|
151
|
+
):
|
152
|
+
return grpc.experimental.unary_unary(
|
153
|
+
request,
|
154
|
+
target,
|
155
|
+
"/executor_api_pb.ExecutorAPI/report_executor_state",
|
156
|
+
indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateRequest.SerializeToString,
|
157
|
+
indexify_dot_proto_dot_executor__api__pb2.ReportExecutorStateResponse.FromString,
|
158
|
+
options,
|
159
|
+
channel_credentials,
|
160
|
+
insecure,
|
161
|
+
call_credentials,
|
162
|
+
compression,
|
163
|
+
wait_for_ready,
|
164
|
+
timeout,
|
165
|
+
metadata,
|
166
|
+
_registered_method=True,
|
167
|
+
)
|
168
|
+
|
169
|
+
@staticmethod
|
170
|
+
def get_desired_executor_states(
|
171
|
+
request,
|
172
|
+
target,
|
173
|
+
options=(),
|
174
|
+
channel_credentials=None,
|
175
|
+
call_credentials=None,
|
176
|
+
insecure=False,
|
177
|
+
compression=None,
|
178
|
+
wait_for_ready=None,
|
179
|
+
timeout=None,
|
180
|
+
metadata=None,
|
181
|
+
):
|
182
|
+
return grpc.experimental.unary_stream(
|
183
|
+
request,
|
184
|
+
target,
|
185
|
+
"/executor_api_pb.ExecutorAPI/get_desired_executor_states",
|
186
|
+
indexify_dot_proto_dot_executor__api__pb2.GetDesiredExecutorStatesRequest.SerializeToString,
|
187
|
+
indexify_dot_proto_dot_executor__api__pb2.DesiredExecutorState.FromString,
|
188
|
+
options,
|
189
|
+
channel_credentials,
|
190
|
+
insecure,
|
191
|
+
call_credentials,
|
192
|
+
compression,
|
193
|
+
wait_for_ready,
|
194
|
+
timeout,
|
195
|
+
metadata,
|
196
|
+
_registered_method=True,
|
197
|
+
)
|
198
|
+
|
199
|
+
@staticmethod
|
200
|
+
def report_task_outcome(
|
201
|
+
request,
|
202
|
+
target,
|
203
|
+
options=(),
|
204
|
+
channel_credentials=None,
|
205
|
+
call_credentials=None,
|
206
|
+
insecure=False,
|
207
|
+
compression=None,
|
208
|
+
wait_for_ready=None,
|
209
|
+
timeout=None,
|
210
|
+
metadata=None,
|
211
|
+
):
|
212
|
+
return grpc.experimental.unary_unary(
|
213
|
+
request,
|
214
|
+
target,
|
215
|
+
"/executor_api_pb.ExecutorAPI/report_task_outcome",
|
216
|
+
indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeRequest.SerializeToString,
|
217
|
+
indexify_dot_proto_dot_executor__api__pb2.ReportTaskOutcomeResponse.FromString,
|
218
|
+
options,
|
219
|
+
channel_credentials,
|
220
|
+
insecure,
|
221
|
+
call_credentials,
|
222
|
+
compression,
|
223
|
+
wait_for_ready,
|
224
|
+
timeout,
|
225
|
+
metadata,
|
226
|
+
_registered_method=True,
|
227
|
+
)
|
@@ -1,13 +1,14 @@
|
|
1
|
-
indexify/cli/cli.py,sha256
|
1
|
+
indexify/cli/cli.py,sha256=TgXC_ZZPT-MJA7CWH297Y4_5M5SDt2QslPUoMotp3Cc,8708
|
2
2
|
indexify/executor/README.md,sha256=ozC6_hMkhQQNVCMEpBxwiUALz6lwErPQxNxQfQDqnG4,2029
|
3
|
-
indexify/executor/api_objects.py,sha256=
|
4
|
-
indexify/executor/downloader.py,sha256=
|
5
|
-
indexify/executor/executor.py,sha256=
|
6
|
-
indexify/executor/
|
7
|
-
indexify/executor/function_executor/
|
8
|
-
indexify/executor/function_executor/
|
9
|
-
indexify/executor/function_executor/
|
10
|
-
indexify/executor/function_executor/
|
3
|
+
indexify/executor/api_objects.py,sha256=qKQMEjr18xIq7yjpnsLPnWXP4KsVQ9O76EsbYoaL_qQ,1507
|
4
|
+
indexify/executor/downloader.py,sha256=59FD2LNUQvl6Ul6m59uTsgE0FWU5t6C2XflaaDcc2FA,9459
|
5
|
+
indexify/executor/executor.py,sha256=jdsp9vP2q8y6rIAIRmwfTXBGW3D5cgaFjfy_tHetJ3k,16035
|
6
|
+
indexify/executor/executor_flavor.py,sha256=uilzDQVVYlQGR1MVnrUC4NevUActDWHdnJkr38M6kTk,118
|
7
|
+
indexify/executor/function_executor/function_executor.py,sha256=rmqJrz4yihIefVhfbIIu3K6HFjKU3eEvEy2xFICYPp4,11881
|
8
|
+
indexify/executor/function_executor/function_executor_state.py,sha256=ljPm1IrRMJ8hFklwvFp7Xax2HMpUIOHm0DwOxxMcy7U,4336
|
9
|
+
indexify/executor/function_executor/function_executor_states_container.py,sha256=wKehM_GXv3i0WkKNS72JVxXq6s60iqiOCX_Gm0qa9pw,3546
|
10
|
+
indexify/executor/function_executor/function_executor_status.py,sha256=FUu5PcFC-kkVSCYGwzcEmvpPytoM--XUZ9ylVjv79S4,3416
|
11
|
+
indexify/executor/function_executor/health_checker.py,sha256=Fvd1gmrcjyJqP-8vcsUxfnTHQIMNlHeMWCS70PAVr9E,6095
|
11
12
|
indexify/executor/function_executor/invocation_state_client.py,sha256=p-xgM4__cHR1ApvMV9hShrGWee_Je0VDhICZUGjpQY4,9644
|
12
13
|
indexify/executor/function_executor/metrics/function_executor.py,sha256=TDksxLRJr-P9ZKhF2Orsaxzzb4lVIBxFEjd_9Zv53Ng,6313
|
13
14
|
indexify/executor/function_executor/metrics/function_executor_state.py,sha256=qheMhnoiYLiZB7ky5EyegfDy4Mr0Zh83bOE0gJ38YmU,1607
|
@@ -19,19 +20,22 @@ indexify/executor/function_executor/server/client_configuration.py,sha256=gOywMu
|
|
19
20
|
indexify/executor/function_executor/server/function_executor_server.py,sha256=_DLivLDikupZusRk8gVWDk7fWPT9XjZ4un1yWSlOObs,883
|
20
21
|
indexify/executor/function_executor/server/function_executor_server_factory.py,sha256=cP93a3t1AfGx8qwageNLVdTwG52UOwzYNbbyrPq2TUQ,1692
|
21
22
|
indexify/executor/function_executor/server/subprocess_function_executor_server.py,sha256=JekDOqF7oFD4J6zcN3xB0Dxd1cgpEXMOsb_rKZOeBlI,668
|
22
|
-
indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py,sha256=
|
23
|
-
indexify/executor/function_executor/single_task_runner.py,sha256=
|
23
|
+
indexify/executor/function_executor/server/subprocess_function_executor_server_factory.py,sha256=g1AUbhOoPsdhp_50Ayahdyv1Ix5-nEBE8orOQfkATpM,4470
|
24
|
+
indexify/executor/function_executor/single_task_runner.py,sha256=OY3a2znwtuv0_Pqn9r5ScGhekNn1OquznKmaGnQL71k,13979
|
24
25
|
indexify/executor/function_executor/task_input.py,sha256=wSrHR4m0juiGClQyeVdhRC37QzDt6Rrjq-ZXJkfBi9k,584
|
25
|
-
indexify/executor/function_executor/task_output.py,sha256=
|
26
|
-
indexify/executor/grpc/
|
27
|
-
indexify/executor/grpc/
|
26
|
+
indexify/executor/function_executor/task_output.py,sha256=kBRy7eSYzxZ3FYQ9PhA56VtBmhJ7ywePICMx_Vx5ipo,3011
|
27
|
+
indexify/executor/grpc/channel_manager.py,sha256=THamn5VghCxRkXDlu2WEXtC6-SNKGc0xoa718bw9A4k,6257
|
28
|
+
indexify/executor/grpc/completed_tasks_container.py,sha256=0JhWBUyEQXurVWZ1UtxoPDLXceIrcnnTBlSmfG3v0Cs,898
|
29
|
+
indexify/executor/grpc/function_executor_controller.py,sha256=pfxMgyxLR2FFbLjyY5Yib8RSaI_6YeQOdf_VscXLqN0,18645
|
30
|
+
indexify/executor/grpc/metrics/channel_manager.py,sha256=k-WArgklmP5WhjcmFmrgRblB7yc3XlaOXO8owRyV-mw,649
|
28
31
|
indexify/executor/grpc/metrics/state_reporter.py,sha256=GggBEjMzQUYIG95LtTS4fUg1u9jYowkaXoUXppAXucs,543
|
29
|
-
indexify/executor/grpc/state_reconciler.py,sha256=
|
30
|
-
indexify/executor/grpc/state_reporter.py,sha256=
|
32
|
+
indexify/executor/grpc/state_reconciler.py,sha256=XRaZxHy2bX-zIzbJCBg3io_ZlslnGeG61dOk0fhYdJw,12866
|
33
|
+
indexify/executor/grpc/state_reporter.py,sha256=7Z3pFqtXucxqAGX3o004uVG6tYWflsnKx1H2ldfnGT8,10043
|
34
|
+
indexify/executor/grpc/task_controller.py,sha256=fsUiABPuZhGAjdpSKm0AVNIyoRxlJVFd4XDo3GzXEIQ,18483
|
31
35
|
indexify/executor/metrics/downloader.py,sha256=lctPh8xjkXeLEFJnl1hNrD1yEhLhIl5sggsR4Yoe_Zc,2746
|
32
36
|
indexify/executor/metrics/executor.py,sha256=ua-Vv_k1CB4juJdF7tEBQbBMksqWAA3iXKKMKXZUCLk,2369
|
33
37
|
indexify/executor/metrics/task_fetcher.py,sha256=iJEwCLzYr2cuz7hRvNiqaa2nvQP4OrA0hm0iJY0YKG0,736
|
34
|
-
indexify/executor/metrics/task_reporter.py,sha256=
|
38
|
+
indexify/executor/metrics/task_reporter.py,sha256=44VT_c7njXlTtPl4xjlsYrIHpaiVAnvhhQdj56RPU6o,1215
|
35
39
|
indexify/executor/metrics/task_runner.py,sha256=ZGFrl7zzfUdgPZnklxRIbnv9wVcHIQRhOGNqn9V2hSk,2047
|
36
40
|
indexify/executor/monitoring/function_allowlist.py,sha256=wUGeiv3aAGWMlQXzHXq9O6MVHby6Tu-zY4U0MyWiQu0,683
|
37
41
|
indexify/executor/monitoring/handler.py,sha256=Cj1cu_LcsAP0tdviqNhoEtGm4h0OJAxxzW9C2YdNXYU,240
|
@@ -43,14 +47,14 @@ indexify/executor/monitoring/prometheus_metrics_handler.py,sha256=KiGqSf7rkXTfbD
|
|
43
47
|
indexify/executor/monitoring/server.py,sha256=yzdYhcxnmY6uTQUMt3vatF5jilN52ZtfFseOmHyQpTo,1254
|
44
48
|
indexify/executor/monitoring/startup_probe_handler.py,sha256=zXXsBU15SMlBx1bSFpxWDfed1VHtKKnwvLQ8-frpG98,425
|
45
49
|
indexify/executor/runtime_probes.py,sha256=bo6Dq6AGZpJH099j0DHtVSDEH80tv3j9MXf3VXSx_p8,2182
|
46
|
-
indexify/executor/task_fetcher.py,sha256=
|
47
|
-
indexify/executor/task_reporter.py,sha256=
|
48
|
-
indexify/executor/task_runner.py,sha256=
|
49
|
-
indexify/proto/
|
50
|
-
indexify/proto/
|
51
|
-
indexify/proto/
|
52
|
-
indexify/proto/
|
53
|
-
indexify-0.3.
|
54
|
-
indexify-0.3.
|
55
|
-
indexify-0.3.
|
56
|
-
indexify-0.3.
|
50
|
+
indexify/executor/task_fetcher.py,sha256=p3iEsWyGi0ZMPAv0183smzOUD1KycQ_dXsyd9mpB9IU,3529
|
51
|
+
indexify/executor/task_reporter.py,sha256=59Bgsjflxzo936KMOj70lGpDhwbUlQDuqqfHEy16kcw,11274
|
52
|
+
indexify/executor/task_runner.py,sha256=2-f6Uupu_aVPg34G27yuiPTC6eE4XnT-qizpzPryzDI,7134
|
53
|
+
indexify/proto/executor_api.proto,sha256=16jEP4VxSaEPWVBx3h2_rel3ltYdgW4SBLvRl-iUe78,8319
|
54
|
+
indexify/proto/executor_api_pb2.py,sha256=dW4zAMZ-YU8aeU77-5ciQ0bTNWDt7v4m6CGQ2VdQZZI,12874
|
55
|
+
indexify/proto/executor_api_pb2.pyi,sha256=6WHUUjsn5y7jJot_y_h3NXy2L04E8Xo-zpO9_tZJcAA,16851
|
56
|
+
indexify/proto/executor_api_pb2_grpc.py,sha256=GGiDtyQlA2382E_ZyKUBYcWNEJHH_RlulieStKfkJXI,9514
|
57
|
+
indexify-0.3.19.dist-info/METADATA,sha256=gii0ukZNSxaQ4jF1J1NtsQOSbisC4lCbIV7hjXSFiqk,1158
|
58
|
+
indexify-0.3.19.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
59
|
+
indexify-0.3.19.dist-info/entry_points.txt,sha256=GU9wmsgvN7nQw3N2X0PMYn1RSvF6CrhH9RuC2D8d3Gk,53
|
60
|
+
indexify-0.3.19.dist-info/RECORD,,
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import asyncio
|
2
|
-
from typing import Any
|
3
|
-
|
4
|
-
import grpc.aio
|
5
|
-
|
6
|
-
from .metrics.channel_creator import (
|
7
|
-
metric_grpc_server_channel_creation_latency,
|
8
|
-
metric_grpc_server_channel_creation_retries,
|
9
|
-
metric_grpc_server_channel_creations,
|
10
|
-
)
|
11
|
-
|
12
|
-
_RETRY_INTERVAL_SEC = 5
|
13
|
-
_CONNECT_TIMEOUT_SEC = 5
|
14
|
-
|
15
|
-
|
16
|
-
class ChannelCreator:
|
17
|
-
def __init__(self, server_address: str, logger: Any):
|
18
|
-
self._logger = logger.bind(module=__name__)
|
19
|
-
self._server_address = server_address
|
20
|
-
self._is_shutdown = False
|
21
|
-
|
22
|
-
async def create(self) -> grpc.aio.Channel:
|
23
|
-
"""Creates a channel to the gRPC server.
|
24
|
-
|
25
|
-
Blocks until the channel is ready.
|
26
|
-
Never raises any exceptions.
|
27
|
-
"""
|
28
|
-
with metric_grpc_server_channel_creation_latency.time():
|
29
|
-
metric_grpc_server_channel_creations.inc()
|
30
|
-
while not self._is_shutdown:
|
31
|
-
try:
|
32
|
-
channel = grpc.aio.insecure_channel(self._server_address)
|
33
|
-
await asyncio.wait_for(
|
34
|
-
channel.channel_ready(),
|
35
|
-
timeout=_CONNECT_TIMEOUT_SEC,
|
36
|
-
)
|
37
|
-
return channel
|
38
|
-
except Exception:
|
39
|
-
self._logger.error(
|
40
|
-
f"failed establishing grpc server channel in {_CONNECT_TIMEOUT_SEC} sec, retrying in {_RETRY_INTERVAL_SEC} sec"
|
41
|
-
)
|
42
|
-
try:
|
43
|
-
await channel.close()
|
44
|
-
except Exception as e:
|
45
|
-
self._logger.error(
|
46
|
-
"failed closing not established channel", exc_info=e
|
47
|
-
)
|
48
|
-
|
49
|
-
metric_grpc_server_channel_creation_retries.inc()
|
50
|
-
await asyncio.sleep(_RETRY_INTERVAL_SEC)
|
51
|
-
|
52
|
-
async def shutdown(self):
|
53
|
-
self._is_shutdown = True
|
@@ -1,64 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
-
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
-
# source: indexify/proto/task_scheduler.proto
|
5
|
-
# Protobuf Python Version: 5.29.0
|
6
|
-
"""Generated protocol buffer code."""
|
7
|
-
from google.protobuf import descriptor as _descriptor
|
8
|
-
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
-
from google.protobuf import runtime_version as _runtime_version
|
10
|
-
from google.protobuf import symbol_database as _symbol_database
|
11
|
-
from google.protobuf.internal import builder as _builder
|
12
|
-
|
13
|
-
_runtime_version.ValidateProtobufRuntimeVersion(
|
14
|
-
_runtime_version.Domain.PUBLIC, 5, 29, 0, "", "indexify/proto/task_scheduler.proto"
|
15
|
-
)
|
16
|
-
# @@protoc_insertion_point(imports)
|
17
|
-
|
18
|
-
_sym_db = _symbol_database.Default()
|
19
|
-
|
20
|
-
|
21
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
|
22
|
-
b'\n#indexify/proto/task_scheduler.proto\x12\x16task_scheduler_service"l\n\x0cGPUResources\x12\x12\n\x05\x63ount\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x34\n\x05model\x18\x02 \x01(\x0e\x32 .task_scheduler_service.GPUModelH\x01\x88\x01\x01\x42\x08\n\x06_countB\x08\n\x06_model"\xc9\x01\n\rHostResources\x12\x16\n\tcpu_count\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x04H\x01\x88\x01\x01\x12\x17\n\ndisk_bytes\x18\x03 \x01(\x04H\x02\x88\x01\x01\x12\x36\n\x03gpu\x18\x04 \x01(\x0b\x32$.task_scheduler_service.GPUResourcesH\x03\x88\x01\x01\x42\x0c\n\n_cpu_countB\x0f\n\r_memory_bytesB\r\n\x0b_disk_bytesB\x06\n\x04_gpu"\xbb\x01\n\x0f\x41llowedFunction\x12\x16\n\tnamespace\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ngraph_name\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x42\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_function_nameB\x10\n\x0e_graph_version"\xf4\x02\n\x1b\x46unctionExecutorDescription\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ngraph_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x05 \x01(\tH\x04\x88\x01\x01\x12\x16\n\timage_uri\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x14\n\x0csecret_names\x18\x07 \x03(\t\x12\x43\n\x0fresource_limits\x18\x08 \x01(\x0b\x32%.task_scheduler_service.HostResourcesH\x06\x88\x01\x01\x42\x05\n\x03_idB\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_graph_versionB\x10\n\x0e_function_nameB\x0c\n\n_image_uriB\x12\n\x10_resource_limits"\xc6\x01\n\x15\x46unctionExecutorState\x12M\n\x0b\x64\x65scription\x18\x01 \x01(\x0b\x32\x33.task_scheduler_service.FunctionExecutorDescriptionH\x00\x88\x01\x01\x12\x43\n\x06status\x18\x02 \x01(\x0e\x32..task_scheduler_service.FunctionExecutorStatusH\x01\x88\x01\x01\x42\x0e\n\x0c_descriptionB\t\n\x07_status"\xb3\x03\n\rExecutorState\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x10\x64\x65velopment_mode\x18\x02 \x01(\x08H\x01\x88\x01\x01\x12\x44\n\x0f\x65xecutor_status\x18\x03 \x01(\x0e\x32&.task_scheduler_service.ExecutorStatusH\x02\x88\x01\x01\x12\x42\n\x0e\x66ree_resources\x18\x04 \x01(\x0b\x32%.task_scheduler_service.HostResourcesH\x03\x88\x01\x01\x12\x42\n\x11\x61llowed_functions\x18\x05 \x03(\x0b\x32\'.task_scheduler_service.AllowedFunction\x12O\n\x18\x66unction_executor_states\x18\x06 \x03(\x0b\x32-.task_scheduler_service.FunctionExecutorStateB\x0e\n\x0c_executor_idB\x13\n\x11_development_modeB\x12\n\x10_executor_statusB\x11\n\x0f_free_resources"s\n\x1aReportExecutorStateRequest\x12\x42\n\x0e\x65xecutor_state\x18\x01 \x01(\x0b\x32%.task_scheduler_service.ExecutorStateH\x00\x88\x01\x01\x42\x11\n\x0f_executor_state"\x1d\n\x1bReportExecutorStateResponse"\x88\x03\n\x04Task\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tnamespace\x18\x02 \x01(\tH\x01\x88\x01\x01\x12\x17\n\ngraph_name\x18\x03 \x01(\tH\x02\x88\x01\x01\x12\x1a\n\rgraph_version\x18\x04 \x01(\tH\x03\x88\x01\x01\x12\x1a\n\rfunction_name\x18\x05 \x01(\tH\x04\x88\x01\x01\x12 \n\x13graph_invocation_id\x18\x06 \x01(\tH\x05\x88\x01\x01\x12\x16\n\tinput_key\x18\x08 \x01(\tH\x06\x88\x01\x01\x12\x1f\n\x12reducer_output_key\x18\t \x01(\tH\x07\x88\x01\x01\x12\x17\n\ntimeout_ms\x18\n \x01(\tH\x08\x88\x01\x01\x42\x05\n\x03_idB\x0c\n\n_namespaceB\r\n\x0b_graph_nameB\x10\n\x0e_graph_versionB\x10\n\x0e_function_nameB\x16\n\x14_graph_invocation_idB\x0c\n\n_input_keyB\x15\n\x13_reducer_output_keyB\r\n\x0b_timeout_ms"\x86\x01\n\x0eTaskAllocation\x12!\n\x14\x66unction_executor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12/\n\x04task\x18\x02 \x01(\x0b\x32\x1c.task_scheduler_service.TaskH\x01\x88\x01\x01\x42\x17\n\x15_function_executor_idB\x07\n\x05_task"K\n\x1fGetDesiredExecutorStatesRequest\x12\x18\n\x0b\x65xecutor_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_executor_id"\xc7\x01\n\x14\x44\x65siredExecutorState\x12O\n\x12\x66unction_executors\x18\x01 \x03(\x0b\x32\x33.task_scheduler_service.FunctionExecutorDescription\x12@\n\x10task_allocations\x18\x02 \x03(\x0b\x32&.task_scheduler_service.TaskAllocation\x12\x12\n\x05\x63lock\x18\x03 \x01(\x04H\x00\x88\x01\x01\x42\x08\n\x06_clock*\x86\x03\n\x08GPUModel\x12\x15\n\x11GPU_MODEL_UNKNOWN\x10\x00\x12"\n\x1eGPU_MODEL_NVIDIA_TESLA_T4_16GB\x10\n\x12$\n GPU_MODEL_NVIDIA_TESLA_V100_16GB\x10\x14\x12\x1d\n\x19GPU_MODEL_NVIDIA_A10_24GB\x10\x1e\x12\x1f\n\x1bGPU_MODEL_NVIDIA_A6000_48GB\x10(\x12#\n\x1fGPU_MODEL_NVIDIA_A100_SXM4_40GB\x10\x32\x12#\n\x1fGPU_MODEL_NVIDIA_A100_SXM4_80GB\x10\x33\x12"\n\x1eGPU_MODEL_NVIDIA_A100_PCI_40GB\x10\x34\x12#\n\x1fGPU_MODEL_NVIDIA_H100_SXM5_80GB\x10<\x12"\n\x1eGPU_MODEL_NVIDIA_H100_PCI_80GB\x10=\x12"\n\x1eGPU_MODEL_NVIDIA_RTX_6000_24GB\x10>*\xa3\x03\n\x16\x46unctionExecutorStatus\x12$\n FUNCTION_EXECUTOR_STATUS_UNKNOWN\x10\x00\x12(\n$FUNCTION_EXECUTOR_STATUS_STARTING_UP\x10\x01\x12:\n6FUNCTION_EXECUTOR_STATUS_STARTUP_FAILED_CUSTOMER_ERROR\x10\x02\x12:\n6FUNCTION_EXECUTOR_STATUS_STARTUP_FAILED_PLATFORM_ERROR\x10\x03\x12!\n\x1d\x46UNCTION_EXECUTOR_STATUS_IDLE\x10\x04\x12)\n%FUNCTION_EXECUTOR_STATUS_RUNNING_TASK\x10\x05\x12&\n"FUNCTION_EXECUTOR_STATUS_UNHEALTHY\x10\x06\x12%\n!FUNCTION_EXECUTOR_STATUS_STOPPING\x10\x07\x12$\n FUNCTION_EXECUTOR_STATUS_STOPPED\x10\x08*\xc3\x01\n\x0e\x45xecutorStatus\x12\x1b\n\x17\x45XECUTOR_STATUS_UNKNOWN\x10\x00\x12\x1f\n\x1b\x45XECUTOR_STATUS_STARTING_UP\x10\x01\x12\x1b\n\x17\x45XECUTOR_STATUS_RUNNING\x10\x02\x12\x1b\n\x17\x45XECUTOR_STATUS_DRAINED\x10\x03\x12\x1c\n\x18\x45XECUTOR_STATUS_STOPPING\x10\x04\x12\x1b\n\x17\x45XECUTOR_STATUS_STOPPED\x10\x05\x32\xa6\x02\n\x14TaskSchedulerService\x12\x82\x01\n\x15report_executor_state\x12\x32.task_scheduler_service.ReportExecutorStateRequest\x1a\x33.task_scheduler_service.ReportExecutorStateResponse"\x00\x12\x88\x01\n\x1bget_desired_executor_states\x12\x37.task_scheduler_service.GetDesiredExecutorStatesRequest\x1a,.task_scheduler_service.DesiredExecutorState"\x00\x30\x01\x62\x06proto3'
|
23
|
-
)
|
24
|
-
|
25
|
-
_globals = globals()
|
26
|
-
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
27
|
-
_builder.BuildTopDescriptorsAndMessages(
|
28
|
-
DESCRIPTOR, "indexify.proto.task_scheduler_pb2", _globals
|
29
|
-
)
|
30
|
-
if not _descriptor._USE_C_DESCRIPTORS:
|
31
|
-
DESCRIPTOR._loaded_options = None
|
32
|
-
_globals["_GPUMODEL"]._serialized_start = 2541
|
33
|
-
_globals["_GPUMODEL"]._serialized_end = 2931
|
34
|
-
_globals["_FUNCTIONEXECUTORSTATUS"]._serialized_start = 2934
|
35
|
-
_globals["_FUNCTIONEXECUTORSTATUS"]._serialized_end = 3353
|
36
|
-
_globals["_EXECUTORSTATUS"]._serialized_start = 3356
|
37
|
-
_globals["_EXECUTORSTATUS"]._serialized_end = 3551
|
38
|
-
_globals["_GPURESOURCES"]._serialized_start = 63
|
39
|
-
_globals["_GPURESOURCES"]._serialized_end = 171
|
40
|
-
_globals["_HOSTRESOURCES"]._serialized_start = 174
|
41
|
-
_globals["_HOSTRESOURCES"]._serialized_end = 375
|
42
|
-
_globals["_ALLOWEDFUNCTION"]._serialized_start = 378
|
43
|
-
_globals["_ALLOWEDFUNCTION"]._serialized_end = 565
|
44
|
-
_globals["_FUNCTIONEXECUTORDESCRIPTION"]._serialized_start = 568
|
45
|
-
_globals["_FUNCTIONEXECUTORDESCRIPTION"]._serialized_end = 940
|
46
|
-
_globals["_FUNCTIONEXECUTORSTATE"]._serialized_start = 943
|
47
|
-
_globals["_FUNCTIONEXECUTORSTATE"]._serialized_end = 1141
|
48
|
-
_globals["_EXECUTORSTATE"]._serialized_start = 1144
|
49
|
-
_globals["_EXECUTORSTATE"]._serialized_end = 1579
|
50
|
-
_globals["_REPORTEXECUTORSTATEREQUEST"]._serialized_start = 1581
|
51
|
-
_globals["_REPORTEXECUTORSTATEREQUEST"]._serialized_end = 1696
|
52
|
-
_globals["_REPORTEXECUTORSTATERESPONSE"]._serialized_start = 1698
|
53
|
-
_globals["_REPORTEXECUTORSTATERESPONSE"]._serialized_end = 1727
|
54
|
-
_globals["_TASK"]._serialized_start = 1730
|
55
|
-
_globals["_TASK"]._serialized_end = 2122
|
56
|
-
_globals["_TASKALLOCATION"]._serialized_start = 2125
|
57
|
-
_globals["_TASKALLOCATION"]._serialized_end = 2259
|
58
|
-
_globals["_GETDESIREDEXECUTORSTATESREQUEST"]._serialized_start = 2261
|
59
|
-
_globals["_GETDESIREDEXECUTORSTATESREQUEST"]._serialized_end = 2336
|
60
|
-
_globals["_DESIREDEXECUTORSTATE"]._serialized_start = 2339
|
61
|
-
_globals["_DESIREDEXECUTORSTATE"]._serialized_end = 2538
|
62
|
-
_globals["_TASKSCHEDULERSERVICE"]._serialized_start = 3554
|
63
|
-
_globals["_TASKSCHEDULERSERVICE"]._serialized_end = 3848
|
64
|
-
# @@protoc_insertion_point(module_scope)
|
@@ -1,170 +0,0 @@
|
|
1
|
-
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
2
|
-
"""Client and server classes corresponding to protobuf-defined services."""
|
3
|
-
import warnings
|
4
|
-
|
5
|
-
import grpc
|
6
|
-
|
7
|
-
from indexify.proto import (
|
8
|
-
task_scheduler_pb2 as indexify_dot_proto_dot_task__scheduler__pb2,
|
9
|
-
)
|
10
|
-
|
11
|
-
GRPC_GENERATED_VERSION = "1.70.0"
|
12
|
-
GRPC_VERSION = grpc.__version__
|
13
|
-
_version_not_supported = False
|
14
|
-
|
15
|
-
try:
|
16
|
-
from grpc._utilities import first_version_is_lower
|
17
|
-
|
18
|
-
_version_not_supported = first_version_is_lower(
|
19
|
-
GRPC_VERSION, GRPC_GENERATED_VERSION
|
20
|
-
)
|
21
|
-
except ImportError:
|
22
|
-
_version_not_supported = True
|
23
|
-
|
24
|
-
if _version_not_supported:
|
25
|
-
raise RuntimeError(
|
26
|
-
f"The grpc package installed is at version {GRPC_VERSION},"
|
27
|
-
+ f" but the generated code in indexify/proto/task_scheduler_pb2_grpc.py depends on"
|
28
|
-
+ f" grpcio>={GRPC_GENERATED_VERSION}."
|
29
|
-
+ f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}"
|
30
|
-
+ f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}."
|
31
|
-
)
|
32
|
-
|
33
|
-
|
34
|
-
class TaskSchedulerServiceStub(object):
|
35
|
-
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
36
|
-
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
37
|
-
"""
|
38
|
-
|
39
|
-
def __init__(self, channel):
|
40
|
-
"""Constructor.
|
41
|
-
|
42
|
-
Args:
|
43
|
-
channel: A grpc.Channel.
|
44
|
-
"""
|
45
|
-
self.report_executor_state = channel.unary_unary(
|
46
|
-
"/task_scheduler_service.TaskSchedulerService/report_executor_state",
|
47
|
-
request_serializer=indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateRequest.SerializeToString,
|
48
|
-
response_deserializer=indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateResponse.FromString,
|
49
|
-
_registered_method=True,
|
50
|
-
)
|
51
|
-
self.get_desired_executor_states = channel.unary_stream(
|
52
|
-
"/task_scheduler_service.TaskSchedulerService/get_desired_executor_states",
|
53
|
-
request_serializer=indexify_dot_proto_dot_task__scheduler__pb2.GetDesiredExecutorStatesRequest.SerializeToString,
|
54
|
-
response_deserializer=indexify_dot_proto_dot_task__scheduler__pb2.DesiredExecutorState.FromString,
|
55
|
-
_registered_method=True,
|
56
|
-
)
|
57
|
-
|
58
|
-
|
59
|
-
class TaskSchedulerServiceServicer(object):
|
60
|
-
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
61
|
-
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
62
|
-
"""
|
63
|
-
|
64
|
-
def report_executor_state(self, request, context):
|
65
|
-
"""Called by Executor every 5 seconds to report that it's still alive and provide its current state.
|
66
|
-
|
67
|
-
Missing 3 reports will result in the Executor being deregistered by Server.
|
68
|
-
"""
|
69
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
70
|
-
context.set_details("Method not implemented!")
|
71
|
-
raise NotImplementedError("Method not implemented!")
|
72
|
-
|
73
|
-
def get_desired_executor_states(self, request, context):
|
74
|
-
"""Called by Executor to open a stream of its desired states. When Server wants Executor to change something
|
75
|
-
it puts a message on the stream with the new desired state of the Executor.
|
76
|
-
|
77
|
-
Deprecated HTTP API is used to download the serialized graph and task inputs.
|
78
|
-
"""
|
79
|
-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
80
|
-
context.set_details("Method not implemented!")
|
81
|
-
raise NotImplementedError("Method not implemented!")
|
82
|
-
|
83
|
-
|
84
|
-
def add_TaskSchedulerServiceServicer_to_server(servicer, server):
|
85
|
-
rpc_method_handlers = {
|
86
|
-
"report_executor_state": grpc.unary_unary_rpc_method_handler(
|
87
|
-
servicer.report_executor_state,
|
88
|
-
request_deserializer=indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateRequest.FromString,
|
89
|
-
response_serializer=indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateResponse.SerializeToString,
|
90
|
-
),
|
91
|
-
"get_desired_executor_states": grpc.unary_stream_rpc_method_handler(
|
92
|
-
servicer.get_desired_executor_states,
|
93
|
-
request_deserializer=indexify_dot_proto_dot_task__scheduler__pb2.GetDesiredExecutorStatesRequest.FromString,
|
94
|
-
response_serializer=indexify_dot_proto_dot_task__scheduler__pb2.DesiredExecutorState.SerializeToString,
|
95
|
-
),
|
96
|
-
}
|
97
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
98
|
-
"task_scheduler_service.TaskSchedulerService", rpc_method_handlers
|
99
|
-
)
|
100
|
-
server.add_generic_rpc_handlers((generic_handler,))
|
101
|
-
server.add_registered_method_handlers(
|
102
|
-
"task_scheduler_service.TaskSchedulerService", rpc_method_handlers
|
103
|
-
)
|
104
|
-
|
105
|
-
|
106
|
-
# This class is part of an EXPERIMENTAL API.
|
107
|
-
class TaskSchedulerService(object):
|
108
|
-
"""Internal API for scheduling and running tasks on Executors. Executors are acting as clients of this API.
|
109
|
-
Server is responsible for scheduling tasks on Executors and Executors are responsible for running the tasks.
|
110
|
-
"""
|
111
|
-
|
112
|
-
@staticmethod
|
113
|
-
def report_executor_state(
|
114
|
-
request,
|
115
|
-
target,
|
116
|
-
options=(),
|
117
|
-
channel_credentials=None,
|
118
|
-
call_credentials=None,
|
119
|
-
insecure=False,
|
120
|
-
compression=None,
|
121
|
-
wait_for_ready=None,
|
122
|
-
timeout=None,
|
123
|
-
metadata=None,
|
124
|
-
):
|
125
|
-
return grpc.experimental.unary_unary(
|
126
|
-
request,
|
127
|
-
target,
|
128
|
-
"/task_scheduler_service.TaskSchedulerService/report_executor_state",
|
129
|
-
indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateRequest.SerializeToString,
|
130
|
-
indexify_dot_proto_dot_task__scheduler__pb2.ReportExecutorStateResponse.FromString,
|
131
|
-
options,
|
132
|
-
channel_credentials,
|
133
|
-
insecure,
|
134
|
-
call_credentials,
|
135
|
-
compression,
|
136
|
-
wait_for_ready,
|
137
|
-
timeout,
|
138
|
-
metadata,
|
139
|
-
_registered_method=True,
|
140
|
-
)
|
141
|
-
|
142
|
-
@staticmethod
|
143
|
-
def get_desired_executor_states(
|
144
|
-
request,
|
145
|
-
target,
|
146
|
-
options=(),
|
147
|
-
channel_credentials=None,
|
148
|
-
call_credentials=None,
|
149
|
-
insecure=False,
|
150
|
-
compression=None,
|
151
|
-
wait_for_ready=None,
|
152
|
-
timeout=None,
|
153
|
-
metadata=None,
|
154
|
-
):
|
155
|
-
return grpc.experimental.unary_stream(
|
156
|
-
request,
|
157
|
-
target,
|
158
|
-
"/task_scheduler_service.TaskSchedulerService/get_desired_executor_states",
|
159
|
-
indexify_dot_proto_dot_task__scheduler__pb2.GetDesiredExecutorStatesRequest.SerializeToString,
|
160
|
-
indexify_dot_proto_dot_task__scheduler__pb2.DesiredExecutorState.FromString,
|
161
|
-
options,
|
162
|
-
channel_credentials,
|
163
|
-
insecure,
|
164
|
-
call_credentials,
|
165
|
-
compression,
|
166
|
-
wait_for_ready,
|
167
|
-
timeout,
|
168
|
-
metadata,
|
169
|
-
_registered_method=True,
|
170
|
-
)
|
File without changes
|
File without changes
|
File without changes
|