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

Class EchoStreamFlightServer

python/pyarrow/tests/test_flight.py:234–248  ·  view source on GitHub ↗

An echo server that streams individual record batches.

Source from the content-addressed store, hash-verified

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