Variable ConnectionFactoryConst

ConnectionFactory: { fromController: ((controllerAddress: string, options?: Partial<FromControllerOptions>) => Promise<Connection>); fromHostList: ((brokerAddresses: string[], options?: Partial<FromHostListOptions>) => Connection) } = ...

Creates Pinot cluster connections via the initialization methods that it exposes.

Type declaration

  • fromController: ((controllerAddress: string, options?: Partial<FromControllerOptions>) => Promise<Connection>)
      • (controllerAddress: string, options?: Partial<FromControllerOptions>): Promise<Connection>
      • Creates a connection to a Pinot cluster given its Controller URL. The connection's query selector will periodically fetch table-to-broker mapping from via the Controller API.

        Returns

        Connection object with a controller-based broker selector

        Throws

        PinotClientError when the first request to the Controller API fails.

        Parameters

        Returns Promise<Connection>

  • fromHostList: ((brokerAddresses: string[], options?: Partial<FromHostListOptions>) => Connection)
      • (brokerAddresses: string[], options?: Partial<FromHostListOptions>): Connection
      • Creates a connection to a Pinot cluster which sends queries randomly between the specified brokers.

        Returns

        Connection object with a simple (random) broker selector

        Parameters

        • brokerAddresses: string[]

          array of Pinot broker URLs

        • options: Partial<FromHostListOptions> = {}

        Returns Connection

Generated using TypeDoc