Class FlightSession
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFlightSession(io.deephaven.client.impl.SessionImpl session, org.apache.arrow.flight.FlightClient client) -
Method Summary
Modifier and TypeMethodDescriptionaddToInputTable(io.deephaven.client.impl.HasTicketId destination, io.deephaven.qst.table.NewTable source, org.apache.arrow.memory.BufferAllocator allocator) Addsourceto the input tabledestination.addToInputTable(io.deephaven.client.impl.HasTicketId destination, org.apache.arrow.flight.FlightStream source) Addsourceto the input tabledestination.voidclose()Closesthissession by invokingSession.closeFuture()and closing the underlyingFlightClient.deleteFromInputTable(io.deephaven.client.impl.HasTicketId destination, io.deephaven.qst.table.NewTable source, org.apache.arrow.memory.BufferAllocator allocator) Deletesourcefrom the input tabledestination.deleteFromInputTable(io.deephaven.client.impl.HasTicketId destination, org.apache.arrow.flight.FlightStream source) Deletesourcefrom the input tabledestination.Iterable<org.apache.arrow.flight.FlightInfo>list()List the flights.static FlightSessionof(io.deephaven.client.impl.SessionImpl session, org.apache.arrow.memory.BufferAllocator incomingAllocator, io.grpc.ManagedChannel channel) Creates a flight session.voidput(io.deephaven.client.impl.HasPathId pathId, io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) Performs a DoPut against thepathIdwith aNewTablepayload.voidput(io.deephaven.client.impl.HasPathId pathId, org.apache.arrow.flight.FlightStream input) Performs a DoPut against thepathIdwith aFlightStreampayload.io.deephaven.client.impl.TableHandleputExport(io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) Creates a new server side exported table backed by the server semantics of DoPut with aNewTablepayload.io.deephaven.client.impl.TableHandleputExport(org.apache.arrow.flight.FlightStream input) Creates a new server side exported table backed by the server semantics of DoPut with aFlightStreampayload.io.deephaven.client.impl.ExportIdputExportManual(io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) Creates a new server side export table backed by the server semantics for DoPut with aNewTablepayload.io.deephaven.client.impl.ExportIdputExportManual(org.apache.arrow.flight.FlightStream input) Creates a new server side export table backed by the server semantics for DoPut with aFlightStreampayload.release(io.deephaven.client.impl.ExportId exportId) Releases theexportId.org.apache.arrow.vector.types.pojo.Schemaschema(io.deephaven.client.impl.HasPathId pathId) Perform a GetSchema to get the schema.org.apache.arrow.vector.types.pojo.Schemaschema(io.deephaven.client.impl.TableHandle handle) Create a schema from the existing handle's response.io.deephaven.client.impl.Sessionsession()The session.org.apache.arrow.flight.FlightClient.ExchangeReaderWriterstartExchange(org.apache.arrow.flight.FlightDescriptor descriptor, org.apache.arrow.flight.CallOption... options) Creates a new server side DoExchange session.org.apache.arrow.flight.FlightStreamstream(io.deephaven.client.impl.HasTicketId ticketId) Perform a DoGet to fetch the data.
-
Field Details
-
session
protected final io.deephaven.client.impl.SessionImpl session -
client
protected final org.apache.arrow.flight.FlightClient client
-
-
Constructor Details
-
FlightSession
protected FlightSession(io.deephaven.client.impl.SessionImpl session, org.apache.arrow.flight.FlightClient client)
-
-
Method Details
-
of
public static FlightSession of(io.deephaven.client.impl.SessionImpl session, org.apache.arrow.memory.BufferAllocator incomingAllocator, io.grpc.ManagedChannel channel) Creates a flight session. Closing the flight session does not closechannel.- Parameters:
session- the sessionincomingAllocator- the incoming allocatorchannel- the managed channel- Returns:
- the flight session
-
session
public io.deephaven.client.impl.Session session()The session.- Returns:
- the session
-
schema
public org.apache.arrow.vector.types.pojo.Schema schema(io.deephaven.client.impl.TableHandle handle) Create a schema from the existing handle's response.Equivalent to
SchemaHelper.schema(handle.response()).- Parameters:
handle- the handle- Returns:
- the schema
- See Also:
-
SchemaHelper.schema(ExportedTableCreationResponse)
-
schema
public org.apache.arrow.vector.types.pojo.Schema schema(io.deephaven.client.impl.HasPathId pathId) Perform a GetSchema to get the schema.- Parameters:
pathId- the path ID- Returns:
- the schema
-
stream
public org.apache.arrow.flight.FlightStream stream(io.deephaven.client.impl.HasTicketId ticketId) Perform a DoGet to fetch the data.- Parameters:
ticketId- the ticket- Returns:
- the stream
-
startExchange
public org.apache.arrow.flight.FlightClient.ExchangeReaderWriter startExchange(org.apache.arrow.flight.FlightDescriptor descriptor, org.apache.arrow.flight.CallOption... options) Creates a new server side DoExchange session.- Parameters:
descriptor- the FlightDescriptor object to include on the first FlightData message (other fields will remain null)options- the GRPC otions to apply to this call- Returns:
- the bi-directional ReaderWriter object
-
putExport
public io.deephaven.client.impl.TableHandle putExport(io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) throws io.deephaven.client.impl.TableHandle.TableHandleException, InterruptedException Creates a new server side exported table backed by the server semantics of DoPut with aNewTablepayload.For more advanced use cases, callers may use
putExportManual(NewTable, BufferAllocator).- Parameters:
table- the tableallocator- the allocator- Returns:
- the table handle
- Throws:
io.deephaven.client.impl.TableHandle.TableHandleException- if a handle exception occursInterruptedException- if the current thread is interrupted
-
putExport
public io.deephaven.client.impl.TableHandle putExport(org.apache.arrow.flight.FlightStream input) throws io.deephaven.client.impl.TableHandle.TableHandleException, InterruptedException Creates a new server side exported table backed by the server semantics of DoPut with aFlightStreampayload.For more advanced use cases, callers may use
putExportManual(FlightStream).- Parameters:
input- the input- Returns:
- the table handle
- Throws:
io.deephaven.client.impl.TableHandle.TableHandleException- if a handle exception occursInterruptedException- if the current thread is interrupted
-
putExportManual
public io.deephaven.client.impl.ExportId putExportManual(io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) Creates a new server side export table backed by the server semantics for DoPut with aNewTablepayload. Callers are responsible for callingrelease(ExportId).This method may be more efficient, depending on how the export is going to be used. If it will simply be bound to another export table, callers should prefer
putExport(NewTable, BufferAllocator).- Parameters:
table- the tableallocator- the allocator- Returns:
- the ticket
-
putExportManual
public io.deephaven.client.impl.ExportId putExportManual(org.apache.arrow.flight.FlightStream input) Creates a new server side export table backed by the server semantics for DoPut with aFlightStreampayload. Callers are responsible for callingrelease(ExportId).This method may be more efficient, depending on how the ticket is going to be used. If it will simply be bound to a ticket table, callers should prefer
putExport(FlightStream).- Parameters:
input- the input- Returns:
- the export ID
-
put
public void put(io.deephaven.client.impl.HasPathId pathId, org.apache.arrow.flight.FlightStream input) Performs a DoPut against thepathIdwith aFlightStreampayload.- Parameters:
pathId- the path IDinput- the input
-
put
public void put(io.deephaven.client.impl.HasPathId pathId, io.deephaven.qst.table.NewTable table, org.apache.arrow.memory.BufferAllocator allocator) Performs a DoPut against thepathIdwith aNewTablepayload.- Parameters:
pathId- the path IDtable- the tableallocator- the allocator
-
addToInputTable
public CompletableFuture<Void> addToInputTable(io.deephaven.client.impl.HasTicketId destination, org.apache.arrow.flight.FlightStream source) Addsourceto the input tabledestination.- Parameters:
destination- the destination input tablesource- the source- Returns:
- the future
- See Also:
-
putExportManual(FlightStream)InputTableService.addToInputTable(HasTicketId, HasTicketId)
-
addToInputTable
public CompletableFuture<Void> addToInputTable(io.deephaven.client.impl.HasTicketId destination, io.deephaven.qst.table.NewTable source, org.apache.arrow.memory.BufferAllocator allocator) Addsourceto the input tabledestination.- Parameters:
destination- the destination input tablesource- the source- Returns:
- the future
- See Also:
-
putExportManual(NewTable, BufferAllocator)InputTableService.addToInputTable(HasTicketId, HasTicketId)
-
deleteFromInputTable
public CompletableFuture<Void> deleteFromInputTable(io.deephaven.client.impl.HasTicketId destination, org.apache.arrow.flight.FlightStream source) Deletesourcefrom the input tabledestination.- Parameters:
destination- the destination input tablesource- the source- Returns:
- the future
- See Also:
-
putExportManual(FlightStream)InputTableService.deleteFromInputTable(HasTicketId, HasTicketId)
-
deleteFromInputTable
public CompletableFuture<Void> deleteFromInputTable(io.deephaven.client.impl.HasTicketId destination, io.deephaven.qst.table.NewTable source, org.apache.arrow.memory.BufferAllocator allocator) Deletesourcefrom the input tabledestination.- Parameters:
destination- the destination input tablesource- the source- Returns:
- the future
- See Also:
-
putExportManual(NewTable, BufferAllocator)InputTableService.deleteFromInputTable(HasTicketId, HasTicketId)
-
release
Releases theexportId.Note: this should only be called in combination with export IDs returned from
putExportManual(NewTable, BufferAllocator)orputExportManual(FlightStream).- Parameters:
exportId- the export ID- Returns:
- the future
-
list
List the flights.- Returns:
- the flights
-
close
Closesthissession by invokingSession.closeFuture()and closing the underlyingFlightClient. More advanced users may prefer to explicitly callSession.closeFuture()and wait first. The state of the underlyingManagedChanneldepends on howthiswas constructed. In most cases, closingthisdoes not close theManagedChannel.- Specified by:
closein interfaceAutoCloseable- Throws:
InterruptedException- if the current thread is interrupted
-