### 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>
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>
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>
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>
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
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
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
- [ ] 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