spark

package
v52.3.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package spark implements the Azure ARM Spark service API version 2019-11-01-preview.

Index

Constants

View Source
const (
	// DefaultLivyAPIVersion is the default value for livy api version
	DefaultLivyAPIVersion = "2019-11-01-preview"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type BaseClient

type BaseClient struct {
	autorest.Client
	Endpoint       string
	LivyAPIVersion string
	SparkPoolName  string
}

BaseClient is the base client for Spark.

func New

func New(endpoint string, sparkPoolName string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(endpoint string, sparkPoolName string, livyAPIVersion string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type BatchClient

type BatchClient struct {
	BaseClient
}

BatchClient is the client for the Batch methods of the Spark service.

func NewBatchClient

func NewBatchClient(endpoint string, sparkPoolName string) BatchClient

NewBatchClient creates an instance of the BatchClient client.

func (BatchClient) CancelSparkBatchJob

func (client BatchClient) CancelSparkBatchJob(ctx context.Context, batchID int32) (result autorest.Response, err error)

CancelSparkBatchJob cancels a running spark batch job. Parameters: batchID - identifier for the batch job.

func (BatchClient) CancelSparkBatchJobPreparer

func (client BatchClient) CancelSparkBatchJobPreparer(ctx context.Context, batchID int32) (*http.Request, error)

CancelSparkBatchJobPreparer prepares the CancelSparkBatchJob request.

func (BatchClient) CancelSparkBatchJobResponder

func (client BatchClient) CancelSparkBatchJobResponder(resp *http.Response) (result autorest.Response, err error)

CancelSparkBatchJobResponder handles the response to the CancelSparkBatchJob request. The method always closes the http.Response Body.

func (BatchClient) CancelSparkBatchJobSender

func (client BatchClient) CancelSparkBatchJobSender(req *http.Request) (*http.Response, error)

CancelSparkBatchJobSender sends the CancelSparkBatchJob request. The method will close the http.Response Body if it receives an error.

func (BatchClient) CreateSparkBatchJob

func (client BatchClient) CreateSparkBatchJob(ctx context.Context, sparkBatchJobOptions BatchJobOptions, detailed *bool) (result BatchJob, err error)

CreateSparkBatchJob create new spark batch job. Parameters: sparkBatchJobOptions - livy compatible batch job request payload. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (BatchClient) CreateSparkBatchJobPreparer

func (client BatchClient) CreateSparkBatchJobPreparer(ctx context.Context, sparkBatchJobOptions BatchJobOptions, detailed *bool) (*http.Request, error)

CreateSparkBatchJobPreparer prepares the CreateSparkBatchJob request.

func (BatchClient) CreateSparkBatchJobResponder

func (client BatchClient) CreateSparkBatchJobResponder(resp *http.Response) (result BatchJob, err error)

CreateSparkBatchJobResponder handles the response to the CreateSparkBatchJob request. The method always closes the http.Response Body.

func (BatchClient) CreateSparkBatchJobSender

func (client BatchClient) CreateSparkBatchJobSender(req *http.Request) (*http.Response, error)

CreateSparkBatchJobSender sends the CreateSparkBatchJob request. The method will close the http.Response Body if it receives an error.

func (BatchClient) GetSparkBatchJob

func (client BatchClient) GetSparkBatchJob(ctx context.Context, batchID int32, detailed *bool) (result BatchJob, err error)

GetSparkBatchJob gets a single spark batch job. Parameters: batchID - identifier for the batch job. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (BatchClient) GetSparkBatchJobPreparer

func (client BatchClient) GetSparkBatchJobPreparer(ctx context.Context, batchID int32, detailed *bool) (*http.Request, error)

GetSparkBatchJobPreparer prepares the GetSparkBatchJob request.

func (BatchClient) GetSparkBatchJobResponder

func (client BatchClient) GetSparkBatchJobResponder(resp *http.Response) (result BatchJob, err error)

GetSparkBatchJobResponder handles the response to the GetSparkBatchJob request. The method always closes the http.Response Body.

func (BatchClient) GetSparkBatchJobSender

func (client BatchClient) GetSparkBatchJobSender(req *http.Request) (*http.Response, error)

GetSparkBatchJobSender sends the GetSparkBatchJob request. The method will close the http.Response Body if it receives an error.

func (BatchClient) GetSparkBatchJobs

func (client BatchClient) GetSparkBatchJobs(ctx context.Context, from *int32, size *int32, detailed *bool) (result BatchJobCollection, err error)

GetSparkBatchJobs list all spark batch jobs which are running under a particular spark pool. Parameters: from - optional param specifying which index the list should begin from. size - optional param specifying the size of the returned list. By default it is 20 and that is the maximum. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (BatchClient) GetSparkBatchJobsPreparer

func (client BatchClient) GetSparkBatchJobsPreparer(ctx context.Context, from *int32, size *int32, detailed *bool) (*http.Request, error)

GetSparkBatchJobsPreparer prepares the GetSparkBatchJobs request.

func (BatchClient) GetSparkBatchJobsResponder

func (client BatchClient) GetSparkBatchJobsResponder(resp *http.Response) (result BatchJobCollection, err error)

GetSparkBatchJobsResponder handles the response to the GetSparkBatchJobs request. The method always closes the http.Response Body.

func (BatchClient) GetSparkBatchJobsSender

func (client BatchClient) GetSparkBatchJobsSender(req *http.Request) (*http.Response, error)

GetSparkBatchJobsSender sends the GetSparkBatchJobs request. The method will close the http.Response Body if it receives an error.

type BatchJob

type BatchJob struct {
	autorest.Response `json:"-"`
	LivyInfo          *BatchJobState `json:"livyInfo,omitempty"`
	// Name - The batch name.
	Name *string `json:"name,omitempty"`
	// WorkspaceName - The workspace name.
	WorkspaceName *string `json:"workspaceName,omitempty"`
	// SparkPoolName - The Spark pool name.
	SparkPoolName *string `json:"sparkPoolName,omitempty"`
	// SubmitterName - The submitter name.
	SubmitterName *string `json:"submitterName,omitempty"`
	// SubmitterID - The submitter identifier.
	SubmitterID *string `json:"submitterId,omitempty"`
	// ArtifactID - The artifact identifier.
	ArtifactID *string `json:"artifactId,omitempty"`
	// JobType - The job type. Possible values include: 'SparkBatch', 'SparkSession'
	JobType JobType `json:"jobType,omitempty"`
	// Result - The Spark batch job result. Possible values include: 'Uncertain', 'Succeeded', 'Failed', 'Cancelled'
	Result BatchJobResultType `json:"result,omitempty"`
	// Scheduler - The scheduler information.
	Scheduler *Scheduler `json:"schedulerInfo,omitempty"`
	// Plugin - The plugin information.
	Plugin *ServicePlugin `json:"pluginInfo,omitempty"`
	// Errors - The error information.
	Errors *[]ServiceError `json:"errorInfo,omitempty"`
	// Tags - The tags.
	Tags map[string]*string `json:"tags"`
	// ID - The session Id.
	ID *int32 `json:"id,omitempty"`
	// AppID - The application id of this session
	AppID *string `json:"appId,omitempty"`
	// AppInfo - The detailed application info.
	AppInfo map[string]*string `json:"appInfo"`
	// State - The batch state
	State *string `json:"state,omitempty"`
	// LogLines - The log lines.
	LogLines *[]string `json:"log,omitempty"`
}

BatchJob ...

func (BatchJob) MarshalJSON

func (bj BatchJob) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BatchJob.

type BatchJobCollection

type BatchJobCollection struct {
	autorest.Response `json:"-"`
	// From - The start index of fetched sessions.
	From *int32 `json:"from,omitempty"`
	// Total - Number of sessions fetched.
	Total *int32 `json:"total,omitempty"`
	// Sessions - Batch list
	Sessions *[]BatchJob `json:"sessions,omitempty"`
}

BatchJobCollection response for batch list operation.

type BatchJobOptions

type BatchJobOptions struct {
	Tags           map[string]*string `json:"tags"`
	ArtifactID     *string            `json:"artifactId,omitempty"`
	Name           *string            `json:"name,omitempty"`
	File           *string            `json:"file,omitempty"`
	ClassName      *string            `json:"className,omitempty"`
	Arguments      *[]string          `json:"args,omitempty"`
	Jars           *[]string          `json:"jars,omitempty"`
	PythonFiles    *[]string          `json:"pyFiles,omitempty"`
	Files          *[]string          `json:"files,omitempty"`
	Archives       *[]string          `json:"archives,omitempty"`
	Configuration  map[string]*string `json:"conf"`
	DriverMemory   *string            `json:"driverMemory,omitempty"`
	DriverCores    *int32             `json:"driverCores,omitempty"`
	ExecutorMemory *string            `json:"executorMemory,omitempty"`
	ExecutorCores  *int32             `json:"executorCores,omitempty"`
	ExecutorCount  *int32             `json:"numExecutors,omitempty"`
}

BatchJobOptions ...

func (BatchJobOptions) MarshalJSON

func (bjo BatchJobOptions) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BatchJobOptions.

type BatchJobResultType

type BatchJobResultType string

BatchJobResultType enumerates the values for batch job result type.

const (
	// Cancelled ...
	Cancelled BatchJobResultType = "Cancelled"
	// Failed ...
	Failed BatchJobResultType = "Failed"
	// Succeeded ...
	Succeeded BatchJobResultType = "Succeeded"
	// Uncertain ...
	Uncertain BatchJobResultType = "Uncertain"
)

func PossibleBatchJobResultTypeValues

func PossibleBatchJobResultTypeValues() []BatchJobResultType

PossibleBatchJobResultTypeValues returns an array of possible values for the BatchJobResultType const type.

type BatchJobState

type BatchJobState struct {
	// NotStartedAt - the time that at which "not_started" livy state was first seen.
	NotStartedAt *date.Time `json:"notStartedAt,omitempty"`
	// StartingAt - the time that at which "starting" livy state was first seen.
	StartingAt *date.Time `json:"startingAt,omitempty"`
	// RunningAt - the time that at which "running" livy state was first seen.
	RunningAt *date.Time `json:"runningAt,omitempty"`
	// DeadAt - time that at which "dead" livy state was first seen.
	DeadAt *date.Time `json:"deadAt,omitempty"`
	// SuccessAt - the time that at which "success" livy state was first seen.
	SuccessAt *date.Time `json:"successAt,omitempty"`
	// TerminatedAt - the time that at which "killed" livy state was first seen.
	TerminatedAt *date.Time `json:"killedAt,omitempty"`
	// RecoveringAt - the time that at which "recovering" livy state was first seen.
	RecoveringAt *date.Time `json:"recoveringAt,omitempty"`
	// CurrentState - the Spark job state.
	CurrentState       *string  `json:"currentState,omitempty"`
	JobCreationRequest *Request `json:"jobCreationRequest,omitempty"`
}

BatchJobState ...

type ErrorSource

type ErrorSource string

ErrorSource enumerates the values for error source.

const (
	// Dependency ...
	Dependency ErrorSource = "Dependency"
	// System ...
	System ErrorSource = "System"
	// Unknown ...
	Unknown ErrorSource = "Unknown"
	// User ...
	User ErrorSource = "User"
)

func PossibleErrorSourceValues

func PossibleErrorSourceValues() []ErrorSource

PossibleErrorSourceValues returns an array of possible values for the ErrorSource const type.

type JobType

type JobType string

JobType enumerates the values for job type.

const (
	// SparkBatch ...
	SparkBatch JobType = "SparkBatch"
	// SparkSession ...
	SparkSession JobType = "SparkSession"
)

func PossibleJobTypeValues

func PossibleJobTypeValues() []JobType

PossibleJobTypeValues returns an array of possible values for the JobType const type.

type PluginCurrentState

type PluginCurrentState string

PluginCurrentState enumerates the values for plugin current state.

const (
	// Cleanup ...
	Cleanup PluginCurrentState = "Cleanup"
	// Ended ...
	Ended PluginCurrentState = "Ended"
	// Monitoring ...
	Monitoring PluginCurrentState = "Monitoring"
	// Preparation ...
	Preparation PluginCurrentState = "Preparation"
	// Queued ...
	Queued PluginCurrentState = "Queued"
	// ResourceAcquisition ...
	ResourceAcquisition PluginCurrentState = "ResourceAcquisition"
	// Submission ...
	Submission PluginCurrentState = "Submission"
)

func PossiblePluginCurrentStateValues

func PossiblePluginCurrentStateValues() []PluginCurrentState

PossiblePluginCurrentStateValues returns an array of possible values for the PluginCurrentState const type.

type Request

type Request struct {
	Name           *string            `json:"name,omitempty"`
	File           *string            `json:"file,omitempty"`
	ClassName      *string            `json:"className,omitempty"`
	Arguments      *[]string          `json:"args,omitempty"`
	Jars           *[]string          `json:"jars,omitempty"`
	PythonFiles    *[]string          `json:"pyFiles,omitempty"`
	Files          *[]string          `json:"files,omitempty"`
	Archives       *[]string          `json:"archives,omitempty"`
	Configuration  map[string]*string `json:"conf"`
	DriverMemory   *string            `json:"driverMemory,omitempty"`
	DriverCores    *int32             `json:"driverCores,omitempty"`
	ExecutorMemory *string            `json:"executorMemory,omitempty"`
	ExecutorCores  *int32             `json:"executorCores,omitempty"`
	ExecutorCount  *int32             `json:"numExecutors,omitempty"`
}

Request ...

func (Request) MarshalJSON

func (r Request) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Request.

type Scheduler

type Scheduler struct {
	SubmittedAt             *date.Time `json:"submittedAt,omitempty"`
	ScheduledAt             *date.Time `json:"scheduledAt,omitempty"`
	EndedAt                 *date.Time `json:"endedAt,omitempty"`
	CancellationRequestedAt *date.Time `json:"cancellationRequestedAt,omitempty"`
	// CurrentState - Possible values include: 'SchedulerCurrentStateQueued', 'SchedulerCurrentStateScheduled', 'SchedulerCurrentStateEnded'
	CurrentState SchedulerCurrentState `json:"currentState,omitempty"`
}

Scheduler ...

type SchedulerCurrentState

type SchedulerCurrentState string

SchedulerCurrentState enumerates the values for scheduler current state.

const (
	// SchedulerCurrentStateEnded ...
	SchedulerCurrentStateEnded SchedulerCurrentState = "Ended"
	// SchedulerCurrentStateQueued ...
	SchedulerCurrentStateQueued SchedulerCurrentState = "Queued"
	// SchedulerCurrentStateScheduled ...
	SchedulerCurrentStateScheduled SchedulerCurrentState = "Scheduled"
)

func PossibleSchedulerCurrentStateValues

func PossibleSchedulerCurrentStateValues() []SchedulerCurrentState

PossibleSchedulerCurrentStateValues returns an array of possible values for the SchedulerCurrentState const type.

type ServiceError

type ServiceError struct {
	Message   *string `json:"message,omitempty"`
	ErrorCode *string `json:"errorCode,omitempty"`
	// Source - Possible values include: 'System', 'User', 'Unknown', 'Dependency'
	Source ErrorSource `json:"source,omitempty"`
}

ServiceError ...

type ServicePlugin

type ServicePlugin struct {
	PreparationStartedAt         *date.Time `json:"preparationStartedAt,omitempty"`
	ResourceAcquisitionStartedAt *date.Time `json:"resourceAcquisitionStartedAt,omitempty"`
	SubmissionStartedAt          *date.Time `json:"submissionStartedAt,omitempty"`
	MonitoringStartedAt          *date.Time `json:"monitoringStartedAt,omitempty"`
	CleanupStartedAt             *date.Time `json:"cleanupStartedAt,omitempty"`
	// CurrentState - Possible values include: 'Preparation', 'ResourceAcquisition', 'Queued', 'Submission', 'Monitoring', 'Cleanup', 'Ended'
	CurrentState PluginCurrentState `json:"currentState,omitempty"`
}

ServicePlugin ...

type Session

type Session struct {
	autorest.Response `json:"-"`
	LivyInfo          *SessionState `json:"livyInfo,omitempty"`
	Name              *string       `json:"name,omitempty"`
	WorkspaceName     *string       `json:"workspaceName,omitempty"`
	SparkPoolName     *string       `json:"sparkPoolName,omitempty"`
	SubmitterName     *string       `json:"submitterName,omitempty"`
	SubmitterID       *string       `json:"submitterId,omitempty"`
	ArtifactID        *string       `json:"artifactId,omitempty"`
	// JobType - Possible values include: 'SparkBatch', 'SparkSession'
	JobType JobType `json:"jobType,omitempty"`
	// Result - Possible values include: 'SessionResultTypeUncertain', 'SessionResultTypeSucceeded', 'SessionResultTypeFailed', 'SessionResultTypeCancelled'
	Result    SessionResultType  `json:"result,omitempty"`
	Scheduler *Scheduler         `json:"schedulerInfo,omitempty"`
	Plugin    *ServicePlugin     `json:"pluginInfo,omitempty"`
	Errors    *[]ServiceError    `json:"errorInfo,omitempty"`
	Tags      map[string]*string `json:"tags"`
	ID        *int32             `json:"id,omitempty"`
	AppID     *string            `json:"appId,omitempty"`
	AppInfo   map[string]*string `json:"appInfo"`
	State     *string            `json:"state,omitempty"`
	LogLines  *[]string          `json:"log,omitempty"`
}

Session ...

func (Session) MarshalJSON

func (s Session) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Session.

type SessionClient

type SessionClient struct {
	BaseClient
}

SessionClient is the client for the Session methods of the Spark service.

func NewSessionClient

func NewSessionClient(endpoint string, sparkPoolName string) SessionClient

NewSessionClient creates an instance of the SessionClient client.

func (SessionClient) CancelSparkSession

func (client SessionClient) CancelSparkSession(ctx context.Context, sessionID int32) (result autorest.Response, err error)

CancelSparkSession cancels a running spark session. Parameters: sessionID - identifier for the session.

func (SessionClient) CancelSparkSessionPreparer

func (client SessionClient) CancelSparkSessionPreparer(ctx context.Context, sessionID int32) (*http.Request, error)

CancelSparkSessionPreparer prepares the CancelSparkSession request.

func (SessionClient) CancelSparkSessionResponder

func (client SessionClient) CancelSparkSessionResponder(resp *http.Response) (result autorest.Response, err error)

CancelSparkSessionResponder handles the response to the CancelSparkSession request. The method always closes the http.Response Body.

func (SessionClient) CancelSparkSessionSender

func (client SessionClient) CancelSparkSessionSender(req *http.Request) (*http.Response, error)

CancelSparkSessionSender sends the CancelSparkSession request. The method will close the http.Response Body if it receives an error.

func (SessionClient) CancelSparkStatement

func (client SessionClient) CancelSparkStatement(ctx context.Context, sessionID int32, statementID int32) (result StatementCancellationResult, err error)

CancelSparkStatement kill a statement within a session. Parameters: sessionID - identifier for the session. statementID - identifier for the statement.

func (SessionClient) CancelSparkStatementPreparer

func (client SessionClient) CancelSparkStatementPreparer(ctx context.Context, sessionID int32, statementID int32) (*http.Request, error)

CancelSparkStatementPreparer prepares the CancelSparkStatement request.

func (SessionClient) CancelSparkStatementResponder

func (client SessionClient) CancelSparkStatementResponder(resp *http.Response) (result StatementCancellationResult, err error)

CancelSparkStatementResponder handles the response to the CancelSparkStatement request. The method always closes the http.Response Body.

func (SessionClient) CancelSparkStatementSender

func (client SessionClient) CancelSparkStatementSender(req *http.Request) (*http.Response, error)

CancelSparkStatementSender sends the CancelSparkStatement request. The method will close the http.Response Body if it receives an error.

func (SessionClient) CreateSparkSession

func (client SessionClient) CreateSparkSession(ctx context.Context, sparkSessionOptions SessionOptions, detailed *bool) (result Session, err error)

CreateSparkSession create new spark session. Parameters: sparkSessionOptions - livy compatible batch job request payload. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (SessionClient) CreateSparkSessionPreparer

func (client SessionClient) CreateSparkSessionPreparer(ctx context.Context, sparkSessionOptions SessionOptions, detailed *bool) (*http.Request, error)

CreateSparkSessionPreparer prepares the CreateSparkSession request.

func (SessionClient) CreateSparkSessionResponder

func (client SessionClient) CreateSparkSessionResponder(resp *http.Response) (result Session, err error)

CreateSparkSessionResponder handles the response to the CreateSparkSession request. The method always closes the http.Response Body.

func (SessionClient) CreateSparkSessionSender

func (client SessionClient) CreateSparkSessionSender(req *http.Request) (*http.Response, error)

CreateSparkSessionSender sends the CreateSparkSession request. The method will close the http.Response Body if it receives an error.

func (SessionClient) CreateSparkStatement

func (client SessionClient) CreateSparkStatement(ctx context.Context, sessionID int32, sparkStatementOptions StatementOptions) (result Statement, err error)

CreateSparkStatement create statement within a spark session. Parameters: sessionID - identifier for the session. sparkStatementOptions - livy compatible batch job request payload.

func (SessionClient) CreateSparkStatementPreparer

func (client SessionClient) CreateSparkStatementPreparer(ctx context.Context, sessionID int32, sparkStatementOptions StatementOptions) (*http.Request, error)

CreateSparkStatementPreparer prepares the CreateSparkStatement request.

func (SessionClient) CreateSparkStatementResponder

func (client SessionClient) CreateSparkStatementResponder(resp *http.Response) (result Statement, err error)

CreateSparkStatementResponder handles the response to the CreateSparkStatement request. The method always closes the http.Response Body.

func (SessionClient) CreateSparkStatementSender

func (client SessionClient) CreateSparkStatementSender(req *http.Request) (*http.Response, error)

CreateSparkStatementSender sends the CreateSparkStatement request. The method will close the http.Response Body if it receives an error.

func (SessionClient) GetSparkSession

func (client SessionClient) GetSparkSession(ctx context.Context, sessionID int32, detailed *bool) (result Session, err error)

GetSparkSession gets a single spark session. Parameters: sessionID - identifier for the session. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (SessionClient) GetSparkSessionPreparer

func (client SessionClient) GetSparkSessionPreparer(ctx context.Context, sessionID int32, detailed *bool) (*http.Request, error)

GetSparkSessionPreparer prepares the GetSparkSession request.

func (SessionClient) GetSparkSessionResponder

func (client SessionClient) GetSparkSessionResponder(resp *http.Response) (result Session, err error)

GetSparkSessionResponder handles the response to the GetSparkSession request. The method always closes the http.Response Body.

func (SessionClient) GetSparkSessionSender

func (client SessionClient) GetSparkSessionSender(req *http.Request) (*http.Response, error)

GetSparkSessionSender sends the GetSparkSession request. The method will close the http.Response Body if it receives an error.

func (SessionClient) GetSparkSessions

func (client SessionClient) GetSparkSessions(ctx context.Context, from *int32, size *int32, detailed *bool) (result SessionCollection, err error)

GetSparkSessions list all spark sessions which are running under a particular spark pool. Parameters: from - optional param specifying which index the list should begin from. size - optional param specifying the size of the returned list. By default it is 20 and that is the maximum. detailed - optional query param specifying whether detailed response is returned beyond plain livy.

func (SessionClient) GetSparkSessionsPreparer

func (client SessionClient) GetSparkSessionsPreparer(ctx context.Context, from *int32, size *int32, detailed *bool) (*http.Request, error)

GetSparkSessionsPreparer prepares the GetSparkSessions request.

func (SessionClient) GetSparkSessionsResponder

func (client SessionClient) GetSparkSessionsResponder(resp *http.Response) (result SessionCollection, err error)

GetSparkSessionsResponder handles the response to the GetSparkSessions request. The method always closes the http.Response Body.

func (SessionClient) GetSparkSessionsSender

func (client SessionClient) GetSparkSessionsSender(req *http.Request) (*http.Response, error)

GetSparkSessionsSender sends the GetSparkSessions request. The method will close the http.Response Body if it receives an error.

func (SessionClient) GetSparkStatement

func (client SessionClient) GetSparkStatement(ctx context.Context, sessionID int32, statementID int32) (result Statement, err error)

GetSparkStatement gets a single statement within a spark session. Parameters: sessionID - identifier for the session. statementID - identifier for the statement.

func (SessionClient) GetSparkStatementPreparer

func (client SessionClient) GetSparkStatementPreparer(ctx context.Context, sessionID int32, statementID int32) (*http.Request, error)

GetSparkStatementPreparer prepares the GetSparkStatement request.

func (SessionClient) GetSparkStatementResponder

func (client SessionClient) GetSparkStatementResponder(resp *http.Response) (result Statement, err error)

GetSparkStatementResponder handles the response to the GetSparkStatement request. The method always closes the http.Response Body.

func (SessionClient) GetSparkStatementSender

func (client SessionClient) GetSparkStatementSender(req *http.Request) (*http.Response, error)

GetSparkStatementSender sends the GetSparkStatement request. The method will close the http.Response Body if it receives an error.

func (SessionClient) GetSparkStatements

func (client SessionClient) GetSparkStatements(ctx context.Context, sessionID int32) (result StatementCollection, err error)

GetSparkStatements gets a list of statements within a spark session. Parameters: sessionID - identifier for the session.

func (SessionClient) GetSparkStatementsPreparer

func (client SessionClient) GetSparkStatementsPreparer(ctx context.Context, sessionID int32) (*http.Request, error)

GetSparkStatementsPreparer prepares the GetSparkStatements request.

func (SessionClient) GetSparkStatementsResponder

func (client SessionClient) GetSparkStatementsResponder(resp *http.Response) (result StatementCollection, err error)

GetSparkStatementsResponder handles the response to the GetSparkStatements request. The method always closes the http.Response Body.

func (SessionClient) GetSparkStatementsSender

func (client SessionClient) GetSparkStatementsSender(req *http.Request) (*http.Response, error)

GetSparkStatementsSender sends the GetSparkStatements request. The method will close the http.Response Body if it receives an error.

func (SessionClient) ResetSparkSessionTimeout

func (client SessionClient) ResetSparkSessionTimeout(ctx context.Context, sessionID int32) (result autorest.Response, err error)

ResetSparkSessionTimeout sends a keep alive call to the current session to reset the session timeout. Parameters: sessionID - identifier for the session.

func (SessionClient) ResetSparkSessionTimeoutPreparer

func (client SessionClient) ResetSparkSessionTimeoutPreparer(ctx context.Context, sessionID int32) (*http.Request, error)

ResetSparkSessionTimeoutPreparer prepares the ResetSparkSessionTimeout request.

func (SessionClient) ResetSparkSessionTimeoutResponder

func (client SessionClient) ResetSparkSessionTimeoutResponder(resp *http.Response) (result autorest.Response, err error)

ResetSparkSessionTimeoutResponder handles the response to the ResetSparkSessionTimeout request. The method always closes the http.Response Body.

func (SessionClient) ResetSparkSessionTimeoutSender

func (client SessionClient) ResetSparkSessionTimeoutSender(req *http.Request) (*http.Response, error)

ResetSparkSessionTimeoutSender sends the ResetSparkSessionTimeout request. The method will close the http.Response Body if it receives an error.

type SessionCollection

type SessionCollection struct {
	autorest.Response `json:"-"`
	From              *int32     `json:"from,omitempty"`
	Total             *int32     `json:"total,omitempty"`
	Sessions          *[]Session `json:"sessions,omitempty"`
}

SessionCollection ...

type SessionOptions

type SessionOptions struct {
	Tags           map[string]*string `json:"tags"`
	ArtifactID     *string            `json:"artifactId,omitempty"`
	Name           *string            `json:"name,omitempty"`
	File           *string            `json:"file,omitempty"`
	ClassName      *string            `json:"className,omitempty"`
	Arguments      *[]string          `json:"args,omitempty"`
	Jars           *[]string          `json:"jars,omitempty"`
	PythonFiles    *[]string          `json:"pyFiles,omitempty"`
	Files          *[]string          `json:"files,omitempty"`
	Archives       *[]string          `json:"archives,omitempty"`
	Configuration  map[string]*string `json:"conf"`
	DriverMemory   *string            `json:"driverMemory,omitempty"`
	DriverCores    *int32             `json:"driverCores,omitempty"`
	ExecutorMemory *string            `json:"executorMemory,omitempty"`
	ExecutorCores  *int32             `json:"executorCores,omitempty"`
	ExecutorCount  *int32             `json:"numExecutors,omitempty"`
}

SessionOptions ...

func (SessionOptions) MarshalJSON

func (so SessionOptions) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SessionOptions.

type SessionResultType

type SessionResultType string

SessionResultType enumerates the values for session result type.

const (
	// SessionResultTypeCancelled ...
	SessionResultTypeCancelled SessionResultType = "Cancelled"
	// SessionResultTypeFailed ...
	SessionResultTypeFailed SessionResultType = "Failed"
	// SessionResultTypeSucceeded ...
	SessionResultTypeSucceeded SessionResultType = "Succeeded"
	// SessionResultTypeUncertain ...
	SessionResultTypeUncertain SessionResultType = "Uncertain"
)

func PossibleSessionResultTypeValues

func PossibleSessionResultTypeValues() []SessionResultType

PossibleSessionResultTypeValues returns an array of possible values for the SessionResultType const type.

type SessionState

type SessionState struct {
	NotStartedAt       *date.Time `json:"notStartedAt,omitempty"`
	StartingAt         *date.Time `json:"startingAt,omitempty"`
	IdleAt             *date.Time `json:"idleAt,omitempty"`
	DeadAt             *date.Time `json:"deadAt,omitempty"`
	ShuttingDownAt     *date.Time `json:"shuttingDownAt,omitempty"`
	TerminatedAt       *date.Time `json:"killedAt,omitempty"`
	RecoveringAt       *date.Time `json:"recoveringAt,omitempty"`
	BusyAt             *date.Time `json:"busyAt,omitempty"`
	ErrorAt            *date.Time `json:"errorAt,omitempty"`
	CurrentState       *string    `json:"currentState,omitempty"`
	JobCreationRequest *Request   `json:"jobCreationRequest,omitempty"`
}

SessionState ...

type Statement

type Statement struct {
	autorest.Response `json:"-"`
	ID                *int32           `json:"id,omitempty"`
	Code              *string          `json:"code,omitempty"`
	State             *string          `json:"state,omitempty"`
	Output            *StatementOutput `json:"output,omitempty"`
}

Statement ...

type StatementCancellationResult

type StatementCancellationResult struct {
	autorest.Response `json:"-"`
	Msg               *string `json:"msg,omitempty"`
}

StatementCancellationResult ...

type StatementCollection

type StatementCollection struct {
	autorest.Response `json:"-"`
	Total             *int32       `json:"total_statements,omitempty"`
	Statements        *[]Statement `json:"statements,omitempty"`
}

StatementCollection ...

type StatementLanguageType

type StatementLanguageType string

StatementLanguageType enumerates the values for statement language type.

const (
	// Dotnetspark ...
	Dotnetspark StatementLanguageType = "dotnetspark"
	// Pyspark ...
	Pyspark StatementLanguageType = "pyspark"
	// Spark ...
	Spark StatementLanguageType = "spark"
	// SQL ...
	SQL StatementLanguageType = "sql"
)

func PossibleStatementLanguageTypeValues

func PossibleStatementLanguageTypeValues() []StatementLanguageType

PossibleStatementLanguageTypeValues returns an array of possible values for the StatementLanguageType const type.

type StatementOptions

type StatementOptions struct {
	Code *string `json:"code,omitempty"`
	// Kind - Possible values include: 'Spark', 'Pyspark', 'Dotnetspark', 'SQL'
	Kind StatementLanguageType `json:"kind,omitempty"`
}

StatementOptions ...

type StatementOutput

type StatementOutput struct {
	Status         *string     `json:"status,omitempty"`
	ExecutionCount *int32      `json:"execution_count,omitempty"`
	Data           interface{} `json:"data,omitempty"`
	ErrorName      *string     `json:"ename,omitempty"`
	ErrorValue     *string     `json:"evalue,omitempty"`
	Traceback      *[]string   `json:"traceback,omitempty"`
}

StatementOutput ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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