Class FlightSqlClientDemoApp

java.lang.Object
org.apache.arrow.flight.sql.example.FlightSqlClientDemoApp
All Implemented Interfaces:
AutoCloseable

public class FlightSqlClientDemoApp extends Object implements AutoCloseable
Flight SQL Client Demo CLI Application.
  • Field Details

  • Constructor Details

    • FlightSqlClientDemoApp

      public FlightSqlClientDemoApp(BufferAllocator bufferAllocator)
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception
    • getCallOptions

      public CallOption[] getCallOptions()
      Gets the current CallOption as an array; usually used as an argument in FlightSqlClient methods.
      Returns:
      current CallOption array.
    • executeApp

      public void executeApp(org.apache.commons.cli.CommandLine cmd) throws Exception
      Calls createFlightSqlClient(String, int) in order to create a FlightSqlClient to be used in future calls, and then calls executeCommand(CommandLine) to execute the command parsed at execution.
      Parameters:
      cmd - parsed CommandLine; often the result of DefaultParser.parse(Options, String[]).
      Throws:
      Exception
    • executeCommand

      public void executeCommand(org.apache.commons.cli.CommandLine cmd) throws Exception
      Parses the "command" CLI argument and redirects to the appropriate method.
      Parameters:
      cmd - parsed CommandLine; often the result of DefaultParser.parse(Options, String[]).
      Throws:
      Exception
    • createFlightSqlClient

      public void createFlightSqlClient(String host, int port)
      Creates a FlightSqlClient to be used with the example methods.
      Parameters:
      host - client's hostname.
      port - client's port.
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception