This is an automated email from the ASF dual-hosted git repository.
lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-cookbook.git
The following commit(s) were added to refs/heads/main by this push:
new 1c9a3f4 MINOR: [Java] Guide clients to use tickets from FlightInfo
(#293)
1c9a3f4 is described below
commit 1c9a3f48627faf2a177410f05624293eb2d30983
Author: Libor Ryšavý <[email protected]>
AuthorDate: Tue Sep 5 14:44:10 2023 +0200
MINOR: [Java] Guide clients to use tickets from FlightInfo (#293)
Not to construct them themselves in their clients.
Co-authored-by: David Li <[email protected]>
---
java/source/flight.rst | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/java/source/flight.rst b/java/source/flight.rst
index fba29e7..7d8fc79 100644
--- a/java/source/flight.rst
+++ b/java/source/flight.rst
@@ -239,8 +239,7 @@ Flight Client and Server
System.out.println("C3: Client (Get Metadata): " + flightInfo);
// Get data information
- try(FlightStream flightStream = flightClient.getStream(new
Ticket(
-
FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8))))
{
+ try(FlightStream flightStream =
flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
int batch = 0;
try (VectorSchemaRoot vectorSchemaRootReceived =
flightStream.getRoot()) {
System.out.println("C4: Client (Get Stream):");
@@ -451,8 +450,7 @@ And get the data back:
}
// Client
- try(FlightStream flightStream = flightClient.getStream(new Ticket(
-
FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8))))
{
+ try(FlightStream flightStream =
flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
int batch = 0;
try (VectorSchemaRoot vectorSchemaRootReceived =
flightStream.getRoot()) {
System.out.println("C4: Client (Get Stream):");