Documentation ¶
Index ¶
Constants ¶
View Source
const ( HeaderContentType = "Content-Type" ContentTypeJSON = "application/json" ErrRequestFailed = "REQUEST_FAILED" )
Variables ¶
View Source
var QuboleStatuses = map[QuboleStatus]struct{}{ QuboleStatusUnknown: {}, QuboleStatusWaiting: {}, QuboleStatusRunning: {}, QuboleStatusDone: {}, QuboleStatusError: {}, QuboleStatusCancelled: {}, }
Functions ¶
This section is empty.
Types ¶
type CommandMetadata ¶ added in v0.5.29
type QuboleClient ¶
type QuboleClient interface { ExecuteHiveCommand(ctx context.Context, commandStr string, timeoutVal uint32, clusterPrimaryLabel string, accountKey string, tags []string, commandMetadata CommandMetadata) (*QuboleCommandDetails, error) KillCommand(ctx context.Context, commandID string, accountKey string) error GetCommandStatus(ctx context.Context, commandID string, accountKey string) (QuboleStatus, error) }
Interface to interact with QuboleClient for hive tasks
func NewQuboleClient ¶
func NewQuboleClient(cfg *config.Config) QuboleClient
type QuboleCommandDetails ¶
type QuboleCommandDetails struct { ID int64 Status QuboleStatus URI url.URL }
type QuboleStatus ¶
type QuboleStatus string
This type is meant only to encapsulate the response coming from Qubole as a type, it is not meant to be stored locally.
const ( QuboleStatusUnknown QuboleStatus = "UNKNOWN" QuboleStatusWaiting QuboleStatus = "WAITING" QuboleStatusRunning QuboleStatus = "RUNNING" QuboleStatusDone QuboleStatus = "DONE" QuboleStatusError QuboleStatus = "ERROR" QuboleStatusCancelled QuboleStatus = "CANCELLED" )
func NewQuboleStatus ¶
func NewQuboleStatus(ctx context.Context, status string) QuboleStatus
type RequestBody ¶
type RequestBody struct { Query string `json:"query,omitempty"` ClusterLabel string `json:"label,omitempty"` CommandType string `json:"command_type,omitempty"` Retry uint32 `json:"retry,omitempty"` Status string `json:"status,omitempty"` Tags []string `json:"tags,omitempty"` Timeout uint32 `json:"timeout,omitempty"` InlineScript string `json:"inline,omitempty"` Files string `json:"files,omitempty"` }
QuboleClient API Request Body, meant to be passed into JSON.marshal Any nil, 0 or "" fields will not be marshaled
Click to show internal directories.
Click to hide internal directories.