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

Class EchoTableStreamFlightServer

python/pyarrow/tests/test_flight.py:251–265  ·  view source on GitHub ↗

An echo server that streams the whole table.

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by 1