9 Commits
Author SHA1 Message Date
b193c4f701 GH-36954: [Python] Add more FlightInfo / FlightEndpoint attributes (#43537)
### Rationale for this change
The C++ classes `FlightInfo` and `FlightEndpoint` have attributes that are not available via the Python API.

### What changes are included in this PR?
Make the following attributes available in Python:
- `FlightInfo.ordered`
- `FlightInfo.app_metadata`
- `FlightEndpoint.expiration_time`
- `FlightEndpoint.app_metadata`

Also makes existing attributes optional in constructor:
- `FlightInfo.total_records`
- `FlightInfo.total_bytes`

### Are these changes tested?
Existing tests that test existing attributes are extended.

### Are there any user-facing changes?
Yes, changes are backward compatible.
* GitHub Issue: #36954

Lead-authored-by: Enrico Minack <github@enrico.minack.dev>
Co-authored-by: Adam Reeve <adreeve@gmail.com>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
2024-11-07 06:37:23 -05:00
Erin RyanandDavid Li c34c6e1dfd ARROW-8742: [C++][Python] Add GRPC Mutual TLS for clients and server
Our team would like to implement mutual tls authentication for a pyarrow client, hence modifications to the C++ and Python implementations to at a GrpcMTls scheme for connections.

Closes #7130 from erinleeryan/master

Lead-authored-by: Erin Ryan <erin.ryan@ccri.com>
Co-authored-by: David Li <li.davidm96@gmail.com>
Signed-off-by: David Li <li.davidm96@gmail.com>
2020-05-13 13:05:15 -04:00
Antoine PitrouandRavindra Wagh 5ab4930bb2 ARROW-8304: [Flight][Python] Fix client example with TLS
The `get` command wouldn't use the adequate TLS root certs when fetching a Flight from its endpoints.

Also fix style in the Python examples and configure `archery lint` to check them.

Closes #6808 from pitrou/ARROW-8304-py-flight-client-tls

Lead-authored-by: Antoine Pitrou <antoine@python.org>
Co-authored-by: Ravindra Wagh <ravindra.wagh@cambridgesemantics.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
2020-04-02 13:04:28 +02:00
Ravindra Wagh 0d2630be01 ARROW-8270 : [Python][Flight] Update Python server example to support TLS
Also improve command line help.

Closes #6787 from pitrou/ARROW-8270-improve-py-flight-example

Authored-by: Ravindra Wagh <ravindra.wagh@cambridgesemantics.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
2020-03-31 18:27:41 +02:00
ravindra-waghandAntoine Pitrou fb8868d255 ARROW-7928: [Python] Update Python flight server and client examples for latest API
Patch by @ravindra-wagh
(had to redo a new branch and GitHub PR because of git UI crappiness, sorry)

Closes #6479 from pitrou/ARROW-7928-update-py-flight-examples and squashes the following commits:

d54dd7d77 <Antoine Pitrou> Some nits
269590fba <ravindra-wagh> Updated client to upload a csv file to the server
322dace54 <ravindra-wagh> Update server.py

Lead-authored-by: ravindra-wagh <57516622+ravindra-wagh@users.noreply.github.com>
Co-authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
2020-02-24 19:26:53 -05:00
David Li c18251e900 ARROW-4651: [Flight] Use URIs instead of host/port pair
I haven't changed the client/server construction interfaces to really take advantage of this. I would rather follow up with creating builders instead, as proposed, as that would be cleaner than special-casing the logic in the current constructors.

Author: David Li <li.davidm96@gmail.com>

Closes #4047 from lihalite/flight-uris and squashes the following commits:

870f6ebb8 <David Li> Add more builder options for Java Flight servers
5c127631b <David Li> Make Python Flight bindings more complete
675acc9bc <David Li> Introduce builder for C++ Flight servers
474419667 <David Li> Use builder for Flight server in Java
460442cea <David Li> Use URIs for Flight locations
2019-05-22 13:02:00 -05:00
David Li 7f7941676e ARROW-5136: [Flight] Call options
Right now the only option is a timeout on an overall call, which will be useful to limit hangs when connecting to a Flight service that might have gone down. (gRPC is rather aggressive about retrying for a while before giving up.)

You could imagine having a health check action in DoAction, for instance, which fails if the call doesn't complete within a short time.

I would also like a stream timeout, where the timeout only fires if there is a long delay between messages on a DoGet or DoAction, but this is hard to implement as-is in gRPC. Implementing an async client interface might be a better way to achieve this.

Author: David Li <li.davidm96@gmail.com>

Closes #4144 from lihalite/arrow-5136-call-options and squashes the following commits:

f20181c90 <David Li> Use varargs for Java Flight CallOptions
a573d2c61 <David Li> Make FlightCallOptions a POD type
d4bef2781 <David Li> Add tests for Flight call options in Python
0e6111154 <David Li> Don't hold GIL during Flight server shutdown
a1829b32c <David Li>  implement call options for Flight
81e3c7908 <David Li>  add call options to Flight
2019-05-08 16:21:49 +02:00
David Li 36b13fa81a ARROW-4947: [Flight/C++] Remove redundant schema parameter to Flight client DoGet
Not a high priority for review - fine to land for 0.14

Author: David Li <David.M.Li@twosigma.com>

Closes #3958 from lihalite/no-redundant-parameter and squashes the following commits:

52ec0b4f5 <David Li> Remove redundant schema parameter to Flight client DoGet
2019-03-19 21:14:16 -05:00
David Li 148213e3be ARROW-3162: Flight Python bindings
- [ ] Add docs
- [ ] Format code
- [ ] Include Python in integration tests (requires binding the JSON reader/writer from C++)
- [ ] Validate performance?
- [ ] Complete server bindings if approach makes sense

Author: David Li <David.M.Li@twosigma.com>
Author: Wes McKinney <wesm+git@apache.org>

Closes #3566 from lihalite/flight-python and squashes the following commits:

ac29ab88 <David Li> Clean up to-be-implemented parts of Flight Python bindings
9d5442a0 <David Li> Clarify various RecordBatchStream{Reader,Writer} wrappers
e1c298ad <David Li> Lint CMake files
77644447 <Wes McKinney> Reformat cmake
c6b02aa9 <David Li> Add basic Python bindings for Flight
2019-02-14 18:16:56 +01:00