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

Class EchoStreamFlightServer

python/pyarrow/tests/test_flight.py:236–250  ·  view source on GitHub ↗

An echo server that streams individual record batches.

Source from the content-addressed store, hash-verified

234
235
236class EchoStreamFlightServer(EchoFlightServer):
237 """An echo server that streams individual record batches."""
238
239 def do_get(self, context, ticket):
240 return flight.GeneratorStream(
241 self.last_message.schema,
242 self.last_message.to_batches(max_chunksize=1024))
243
244 def list_actions(self, context):
245 return []
246
247 def do_action(self, context, action):
248 if action.type == "who-am-i":
249 return [context.peer_identity(), context.peer().encode("utf-8")]
250 raise NotImplementedError
251
252
253class EchoTableStreamFlightServer(EchoFlightServer):

Callers 6

test_http_basic_unauthFunction · 0.85
test_http_basic_authFunction · 0.85
test_token_authFunction · 0.85
test_token_auth_invalidFunction · 0.85

Calls

no outgoing calls

Tested by 6

test_http_basic_unauthFunction · 0.68
test_http_basic_authFunction · 0.68
test_token_authFunction · 0.68
test_token_auth_invalidFunction · 0.68