Skip to content

Commit 1c9a3f4

Browse files
lirylidavidm
andauthored
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]>
1 parent c20eea0 commit 1c9a3f4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

java/source/flight.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,7 @@ Flight Client and Server
239239
System.out.println("C3: Client (Get Metadata): " + flightInfo);
240240

241241
// Get data information
242-
try(FlightStream flightStream = flightClient.getStream(new Ticket(
243-
FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)))) {
242+
try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
244243
int batch = 0;
245244
try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
246245
System.out.println("C4: Client (Get Stream):");
@@ -451,8 +450,7 @@ And get the data back:
451450
}
452451
453452
// Client
454-
try(FlightStream flightStream = flightClient.getStream(new Ticket(
455-
FlightDescriptor.path("profiles").getPath().get(0).getBytes(StandardCharsets.UTF_8)))) {
453+
try(FlightStream flightStream = flightClient.getStream(flightInfo.getEndpoints().get(0).getTicket())) {
456454
int batch = 0;
457455
try (VectorSchemaRoot vectorSchemaRootReceived = flightStream.getRoot()) {
458456
System.out.println("C4: Client (Get Stream):");

0 commit comments

Comments
 (0)