BryanCutler commented on a change in pull request #12636:
URL: https://github.com/apache/arrow/pull/12636#discussion_r827449705



##########
File path: 
java/flight/flight-integration-tests/src/main/java/org/apache/arrow/flight/integration/tests/IntegrationTestClient.java
##########
@@ -152,46 +153,57 @@ public void onNext(PutResult val) {
       // 3. Download the data from the server.
       List<Location> locations = endpoint.getLocations();
       if (locations.isEmpty()) {
-        throw new RuntimeException("No locations returned from Flight 
server.");
+        // No locations provided, validate the server itself.
+        System.out.println("Verifying location " + server.getUri());
+        testTicket(allocator, client, endpoint.getTicket(), inputPath);
+      } else {
+        // All locations should be equivalent, validate each one.
+        for (Location location : locations) {
+          System.out.println("Verifying location " + location.getUri());

Review comment:
       here also?

##########
File path: format/Flight.proto
##########
@@ -280,9 +281,16 @@ message FlightEndpoint {
   Ticket ticket = 1;
 
   /*
-   * A list of URIs where this ticket can be redeemed. If the list is
-   * empty, the expectation is that the ticket can only be redeemed on the
-   * current service where the ticket was generated.
+   * A list of URIs where this ticket can be redeemed.
+   *
+   * If the list is empty, the expectation is that the ticket can only
+   * be redeemed on the current service where the ticket was
+   * generated.
+   *
+   * If the list is not empty, the expectation is that the ticket can
+   * be redeemed at any of the locations, and that the data returned
+   * will be equivalent. In other words, multiple locations provide
+   * redundancy/load balancing.

Review comment:
       Is there an intention that if the endpoint list is not empty, the ticket 
must be redeemed from one of those and not the service that generated the 
ticket, or is that up to interpretation by the application?

##########
File path: 
java/flight/flight-integration-tests/src/main/java/org/apache/arrow/flight/integration/tests/IntegrationTestClient.java
##########
@@ -152,46 +153,57 @@ public void onNext(PutResult val) {
       // 3. Download the data from the server.
       List<Location> locations = endpoint.getLocations();
       if (locations.isEmpty()) {
-        throw new RuntimeException("No locations returned from Flight 
server.");
+        // No locations provided, validate the server itself.
+        System.out.println("Verifying location " + server.getUri());

Review comment:
       Was this intentional to leave in?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to