pinot

package
v0.0.0-...-bff5916 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregationResult

type AggregationResult struct {
	Function       string       `json:"function"`
	Value          string       `json:"value,omitempty"`
	GroupByColumns []string     `json:"groupByColumns,omitempty"`
	GroupByResult  []GroupValue `json:"groupByResult,omitempty"`
}

AggregationResult is the data structure for PQL aggregation result

type BrokerResponse

type BrokerResponse struct {
	AggregationResults          []*AggregationResult `json:"aggregationResults,omitempty"`
	SelectionResults            *SelectionResults    `json:"SelectionResults,omitempty"`
	ResultTable                 *ResultTable         `json:"resultTable,omitempty"`
	Exceptions                  []Exception          `json:"exceptions"`
	TraceInfo                   map[string]string    `json:"traceInfo,omitempty"`
	NumServersQueried           int                  `json:"numServersQueried"`
	NumServersResponded         int                  `json:"numServersResponded"`
	NumSegmentsQueried          int                  `json:"numSegmentsQueried"`
	NumSegmentsProcessed        int                  `json:"numSegmentsProcessed"`
	NumSegmentsMatched          int                  `json:"numSegmentsMatched"`
	NumConsumingSegmentsQueried int                  `json:"numConsumingSegmentsQueried"`
	NumDocsScanned              int64                `json:"numDocsScanned"`
	NumEntriesScannedInFilter   int64                `json:"numEntriesScannedInFilter"`
	NumEntriesScannedPostFilter int64                `json:"numEntriesScannedPostFilter"`
	NumGroupsLimitReached       bool                 `json:"numGroupsLimitReached"`
	TotalDocs                   int64                `json:"totalDocs"`
	TimeUsedMs                  int                  `json:"timeUsedMs"`
	MinConsumingFreshnessTimeMs int64                `json:"minConsumingFreshnessTimeMs"`
}

BrokerResponse is the data structure for broker response.

type ClientConfig

type ClientConfig struct {

	// Request header
	ExtraHTTPHeader map[string]string

	// Zookeeper Configs
	ZkConfig *ZookeeperConfig

	// BrokerList
	BrokerList []string
}

ClientConfig configs to create a PinotDbConnection

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

Connection to Pinot, normally created through calls to the {@link ConnectionFactory}.

func NewFromBrokerList

func NewFromBrokerList(brokerList []string) (*Connection, error)

NewFromBrokerList create a new Pinot connection with pre configured Pinot Broker list.

func NewFromZookeeper

func NewFromZookeeper(zkPath []string, zkPathPrefix string, pinotCluster string) (*Connection, error)

NewFromZookeeper create a new Pinot connection through Pinot Zookeeper.

func NewWithConfig

func NewWithConfig(config *ClientConfig) (*Connection, error)

NewWithConfig create a new Pinot connection.

func (*Connection) ExecutePQL

func (c *Connection) ExecutePQL(table string, query string) (*BrokerResponse, error)

ExecutePQL for a given table

func (*Connection) ExecuteSQL

func (c *Connection) ExecuteSQL(table string, query string) (*BrokerResponse, error)

ExecuteSQL for a given table

type Exception

type Exception struct {
	ErrorCode int    `json:"errorCode"`
	Message   string `json:"message"`
}

Exception is Pinot exceptions.

type GroupValue

type GroupValue struct {
	Value string   `json:"value"`
	Group []string `json:"group"`
}

GroupValue is the data structure for PQL aggregation GroupBy result

type ReadZNode

type ReadZNode func(path string) ([]byte, error)

type Request

type Request struct {
	// contains filtered or unexported fields
}

Request is used in server request to host multiple pinot query types, like PQL, SQL.

type RespSchema

type RespSchema struct {
	ColumnDataTypes []string `json:"columnDataTypes"`
	ColumnNames     []string `json:"columnNames"`
}

RespSchema is response schema

type ResultTable

type ResultTable struct {
	DataSchema RespSchema      `json:"dataSchema"`
	Rows       [][]interface{} `json:"rows"`
}

ResultTable is a ResultTable

func (ResultTable) Get

func (r ResultTable) Get(rowIndex int, columnIndex int) interface{}

Get returns a ResultTable entry given row index and column index

func (ResultTable) GetColumnCount

func (r ResultTable) GetColumnCount() int

GetColumnCount returns how many columns in the ResultTable

func (ResultTable) GetColumnDataType

func (r ResultTable) GetColumnDataType(columnIndex int) string

GetColumnDataType returns column data type given column index

func (ResultTable) GetColumnName

func (r ResultTable) GetColumnName(columnIndex int) string

GetColumnName returns column name given column index

func (ResultTable) GetDouble

func (r ResultTable) GetDouble(rowIndex int, columnIndex int) float64

GetDouble returns a ResultTable double entry given row index and column index

func (ResultTable) GetFloat

func (r ResultTable) GetFloat(rowIndex int, columnIndex int) float32

GetFloat returns a ResultTable float entry given row index and column index

func (ResultTable) GetInt

func (r ResultTable) GetInt(rowIndex int, columnIndex int) int32

GetInt returns a ResultTable int entry given row index and column index

func (ResultTable) GetLong

func (r ResultTable) GetLong(rowIndex int, columnIndex int) int64

GetLong returns a ResultTable long entry given row index and column index

func (ResultTable) GetRowCount

func (r ResultTable) GetRowCount() int

GetRowCount returns how many rows in the ResultTable

func (ResultTable) GetString

func (r ResultTable) GetString(rowIndex int, columnIndex int) string

GetString returns a ResultTable string entry given row index and column index

type SelectionResults

type SelectionResults struct {
	Columns []string   `json:"columns"`
	Results [][]string `json:"results"`
}

SelectionResults is the data structure for PQL aggregation result

type ZookeeperConfig

type ZookeeperConfig struct {
	ZookeeperPath     []string
	PathPrefix        string
	SessionTimeoutSec int
}

ZookeeperConfig describes how to config Pinot Zookeeper connection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL