MCPcopy Create free account
hub / github.com/apache/arrow / EchoTableStreamFlightServer

Class EchoTableStreamFlightServer

python/pyarrow/tests/test_flight.py:253–267  ·  view source on GitHub ↗

An echo server that streams the whole table.

Source from the content-addressed store, hash-verified

251
252
253class EchoTableStreamFlightServer(EchoFlightServer):
254 """An echo server that streams the whole table."""
255
256 def do_get(self, context, ticket):
257 return flight.GeneratorStream(
258 self.last_message.schema,
259 [self.last_message])
260
261 def list_actions(self, context):
262 return []
263
264 def do_action(self, context, action):
265 if action.type == "who-am-i":
266 return [context.peer_identity(), context.peer().encode("utf-8")]
267 raise NotImplementedError
268
269
270class EchoRecordBatchReaderStreamFlightServer(EchoFlightServer):

Callers 1

Calls

no outgoing calls

Tested by 1