Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PrestoStatuses = map[PrestoStatus]struct{}{ PrestoStatusUnknown: {}, PrestoStatusWaiting: {}, PrestoStatusRunning: {}, PrestoStatusFinished: {}, PrestoStatusFailed: {}, PrestoStatusCancelled: {}, }
Functions ¶
This section is empty.
Types ¶
type PrestoClient ¶
type PrestoClient interface {
// Submits a query to Presto
ExecuteCommand(ctx context.Context, commandStr string, executeArgs PrestoExecuteArgs) (PrestoExecuteResponse, error)
// Cancels a currently running Presto query
KillCommand(ctx context.Context, commandID string) error
// Gets the status of a Presto query
GetCommandStatus(ctx context.Context, commandID string) (PrestoStatus, error)
}
Interface to interact with PrestoClient for Presto tasks
func NewNoopPrestoClient ¶
func NewNoopPrestoClient(cfg *config.Config) PrestoClient
type PrestoExecuteArgs ¶
type PrestoExecuteArgs struct {
RoutingGroup string `json:"routingGroup,omitempty"`
Catalog string `json:"catalog,omitempty"`
Schema string `json:"schema,omitempty"`
Source string `json:"source,omitempty"`
User string `json:"user,omitempty"`
}
Contains information needed to execute a Presto query
type PrestoExecuteResponse ¶
type PrestoExecuteResponse struct {
ID string `json:"id,omitempty"`
Status PrestoStatus `json:"status,omitempty"`
NextURI string `json:"nextUri,omitempty"`
}
Representation of a response after submitting a query to Presto
type PrestoStatus ¶
type PrestoStatus string
const ( PrestoStatusUnknown PrestoStatus = "UNKNOWN" PrestoStatusWaiting PrestoStatus = "WAITING" PrestoStatusRunning PrestoStatus = "RUNNING" PrestoStatusFinished PrestoStatus = "FINISHED" PrestoStatusFailed PrestoStatus = "FAILED" PrestoStatusCancelled PrestoStatus = "CANCELLED" )
This type is meant only to encapsulate the response coming from Presto as a type, it is not meant to be stored locally.
func NewPrestoStatus ¶
func NewPrestoStatus(ctx context.Context, state string) PrestoStatus
Click to show internal directories.
Click to hide internal directories.