lidavidm commented on code in PR #38331:
URL: https://github.com/apache/arrow/pull/38331#discussion_r1367070509


##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightEndpoint.java:
##########
@@ -54,13 +56,27 @@ public FlightEndpoint(Ticket ticket, Location... locations) 
{
    * Constructs a new endpoint with an expiration time.
    *
    * @param ticket A ticket that describe the key of a data stream.
+   * @param expirationTime (optional) When this endpoint expires.
    * @param locations  The possible locations the stream can be retrieved from.
    */
   public FlightEndpoint(Ticket ticket, Instant expirationTime, Location... 
locations) {
+    this(ticket, expirationTime, "", locations);

Review Comment:
   Use `null`



##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightEndpoint.java:
##########
@@ -39,6 +40,7 @@ public class FlightEndpoint {
   private final List<Location> locations;
   private final Ticket ticket;
   private final Instant expirationTime;
+  private final String appMetadata;

Review Comment:
   Let's use `byte[]` since it can be binary. (ArrowBuf would be better but it 
needs explicit closing.)



##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightInfo.java:
##########
@@ -51,6 +51,7 @@ public class FlightInfo {
   private final long records;
   private final boolean ordered;
   private final IpcOption option;
+  private final String appMetadata;

Review Comment:
   Let's use `byte[]` here too



##########
java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightEndpoint.java:
##########
@@ -54,13 +56,27 @@ public FlightEndpoint(Ticket ticket, Location... locations) 
{
    * Constructs a new endpoint with an expiration time.
    *
    * @param ticket A ticket that describe the key of a data stream.
+   * @param expirationTime (optional) When this endpoint expires.
    * @param locations  The possible locations the stream can be retrieved from.
    */
   public FlightEndpoint(Ticket ticket, Instant expirationTime, Location... 
locations) {
+    this(ticket, expirationTime, "", locations);
+  }
+
+  /**
+   * Constructs a new endpoint with an expiration time.
+   *
+   * @param ticket A ticket that describe the key of a data stream.
+   * @param expirationTime (optional) When this endpoint expires.
+   * @param appMetadata (optional) Application metadata associated with this 
endpoint.
+   * @param locations  The possible locations the stream can be retrieved from.
+   */
+  public FlightEndpoint(Ticket ticket, Instant expirationTime, String 
appMetadata, Location... locations) {

Review Comment:
   We can omit that. A builder could be added.



-- 
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