Class FlightInfo

java.lang.Object
org.apache.arrow.flight.FlightInfo

public class FlightInfo extends Object
A POJO representation of a FlightInfo, metadata associated with a set of data records.
  • Constructor Details

    • FlightInfo

      public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records)
      Constructs a new instance.
      Parameters:
      schema - The schema of the Flight
      descriptor - An identifier for the Flight.
      endpoints - A list of endpoints that have the flight available.
      bytes - The number of bytes in the flight
      records - The number of records in the flight.
    • FlightInfo

      public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, IpcOption option)
      Constructs a new instance.
      Parameters:
      schema - The schema of the Flight
      descriptor - An identifier for the Flight.
      endpoints - A list of endpoints that have the flight available.
      bytes - The number of bytes in the flight
      records - The number of records in the flight.
      option - IPC write options.
    • FlightInfo

      public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option)
      Constructs a new instance.
      Parameters:
      schema - The schema of the Flight
      descriptor - An identifier for the Flight.
      endpoints - A list of endpoints that have the flight available.
      bytes - The number of bytes in the flight
      records - The number of records in the flight.
      ordered - Whether the endpoints in this flight are ordered.
      option - IPC write options.
    • FlightInfo

      public FlightInfo(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints, long bytes, long records, boolean ordered, IpcOption option, byte[] appMetadata)
      Constructs a new instance.
      Parameters:
      schema - The schema of the Flight
      descriptor - An identifier for the Flight.
      endpoints - A list of endpoints that have the flight available.
      bytes - The number of bytes in the flight
      records - The number of records in the flight.
      ordered - Whether the endpoints in this flight are ordered.
      option - IPC write options.
      appMetadata - Metadata to send along with the flight
  • Method Details

    • getSchemaOptional

      public Optional<Schema> getSchemaOptional()
    • getSchema

      @Deprecated public Schema getSchema()
      Deprecated.
      Deprecated. Use getSchemaOptional() instead.
      Returns the schema, or an empty schema if no schema is present.
    • getBytes

      public long getBytes()
    • getRecords

      public long getRecords()
    • getDescriptor

      public FlightDescriptor getDescriptor()
    • getEndpoints

      public List<FlightEndpoint> getEndpoints()
    • getOrdered

      public boolean getOrdered()
    • getAppMetadata

      public byte[] getAppMetadata()
    • serialize

      public ByteBuffer serialize()
      Get the serialized form of this protocol message.

      Intended to help interoperability by allowing non-Flight services to still return Flight types.

    • deserialize

      public static FlightInfo deserialize(ByteBuffer serialized) throws IOException, URISyntaxException
      Parse the serialized form of this protocol message.

      Intended to help interoperability by allowing Flight clients to obtain stream info from non-Flight services.

      Parameters:
      serialized - The serialized form of the FlightInfo, as returned by serialize().
      Returns:
      The deserialized FlightInfo.
      Throws:
      IOException - if the serialized form is invalid.
      URISyntaxException - if the serialized form contains an unsupported URI format.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static FlightInfo.Builder builder(Schema schema, FlightDescriptor descriptor, List<FlightEndpoint> endpoints)
      Create a builder for FlightInfo.
      Parameters:
      schema - The schema of the Flight
      descriptor - An identifier for the Flight.
      endpoints - A list of endpoints that have the flight available.