MINOR: [Java] Guide clients to use tickets from FlightInfo (#293)
Not to construct them themselves in their clients.
Co-authored-by: David Li <li.davidm96@gmail.com>
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 @@
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 @@
}
// 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):");