hdinsight

package
v39.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package hdinsight implements the Azure ARM Hdinsight service API version 2018-11-01-preview.

The HDInsight Job Client.

Index

Constants

This section is empty.

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 AppState

type AppState struct {
	autorest.Response `json:"-"`
	// State - The State of the application. Possible values include: 'NEW', 'NEWSAVING', 'SUBMITTED', 'ACCEPTED', 'RUNNING', 'FINISHED', 'FINISHING', 'FAILED', 'KILLED'
	State ApplicationState `json:"state,omitempty"`
}

AppState the State of the application.

type ApplicationState

type ApplicationState string

ApplicationState enumerates the values for application state.

const (
	// ACCEPTED ...
	ACCEPTED ApplicationState = "ACCEPTED"
	// FAILED ...
	FAILED ApplicationState = "FAILED"
	// FINISHED ...
	FINISHED ApplicationState = "FINISHED"
	// FINISHING ...
	FINISHING ApplicationState = "FINISHING"
	// KILLED ...
	KILLED ApplicationState = "KILLED"
	// NEW ...
	NEW ApplicationState = "NEW"
	// NEWSAVING ...
	NEWSAVING ApplicationState = "NEW_SAVING"
	// RUNNING ...
	RUNNING ApplicationState = "RUNNING"
	// SUBMITTED ...
	SUBMITTED ApplicationState = "SUBMITTED"
)

func PossibleApplicationStateValues

func PossibleApplicationStateValues() []ApplicationState

PossibleApplicationStateValues returns an array of possible values for the ApplicationState const type.

type BaseClient

type BaseClient struct {
	autorest.Client
	ClusterDNSName string
	UserName       string
}

BaseClient is the base client for Hdinsight.

func New

func New(clusterDNSName string, userName string) BaseClient

New creates an instance of the BaseClient client.

func NewWithoutDefaults

func NewWithoutDefaults(clusterDNSName string, userName string) BaseClient

NewWithoutDefaults creates an instance of the BaseClient client.

type JobClient

type JobClient struct {
	BaseClient
}

JobClient is the the HDInsight Job Client.

func NewJobClient

func NewJobClient(clusterDNSName string, userName string) JobClient

NewJobClient creates an instance of the JobClient client.

func (JobClient) Get

func (client JobClient) Get(ctx context.Context, jobID string) (result JobDetailRootJSONObject, err error)

Get gets job details from the specified HDInsight cluster. Parameters: jobID - the id of the job.

func (JobClient) GetAppState

func (client JobClient) GetAppState(ctx context.Context, appID string) (result AppState, err error)

GetAppState gets application state from the specified HDInsight cluster. Parameters: appID - the id of the job.

func (JobClient) GetAppStatePreparer

func (client JobClient) GetAppStatePreparer(ctx context.Context, appID string) (*http.Request, error)

GetAppStatePreparer prepares the GetAppState request.

func (JobClient) GetAppStateResponder

func (client JobClient) GetAppStateResponder(resp *http.Response) (result AppState, err error)

GetAppStateResponder handles the response to the GetAppState request. The method always closes the http.Response Body.

func (JobClient) GetAppStateSender

func (client JobClient) GetAppStateSender(req *http.Request) (*http.Response, error)

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

func (JobClient) GetPreparer

func (client JobClient) GetPreparer(ctx context.Context, jobID string) (*http.Request, error)

GetPreparer prepares the Get request.

func (JobClient) GetResponder

func (client JobClient) GetResponder(resp *http.Response) (result JobDetailRootJSONObject, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (JobClient) GetSender

func (client JobClient) GetSender(req *http.Request) (*http.Response, error)

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

func (JobClient) Kill

func (client JobClient) Kill(ctx context.Context, jobID string) (result JobDetailRootJSONObject, err error)

Kill initiates cancel on given running job in the specified HDInsight. Parameters: jobID - the id of the job.

func (JobClient) KillPreparer

func (client JobClient) KillPreparer(ctx context.Context, jobID string) (*http.Request, error)

KillPreparer prepares the Kill request.

func (JobClient) KillResponder

func (client JobClient) KillResponder(resp *http.Response) (result JobDetailRootJSONObject, err error)

KillResponder handles the response to the Kill request. The method always closes the http.Response Body.

func (JobClient) KillSender

func (client JobClient) KillSender(req *http.Request) (*http.Response, error)

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

func (JobClient) List

func (client JobClient) List(ctx context.Context) (result ListJobListJSONObject, err error)

List gets the list of jobs from the specified HDInsight cluster.

func (JobClient) ListAfterJobID

func (client JobClient) ListAfterJobID(ctx context.Context, jobid string, numrecords *int32) (result ListJobListJSONObject, err error)

ListAfterJobID gets numrecords Of Jobs after jobid from the specified HDInsight cluster. Parameters: jobid - jobId from where to list jobs. numrecords - number of jobs to fetch.

func (JobClient) ListAfterJobIDPreparer

func (client JobClient) ListAfterJobIDPreparer(ctx context.Context, jobid string, numrecords *int32) (*http.Request, error)

ListAfterJobIDPreparer prepares the ListAfterJobID request.

func (JobClient) ListAfterJobIDResponder

func (client JobClient) ListAfterJobIDResponder(resp *http.Response) (result ListJobListJSONObject, err error)

ListAfterJobIDResponder handles the response to the ListAfterJobID request. The method always closes the http.Response Body.

func (JobClient) ListAfterJobIDSender

func (client JobClient) ListAfterJobIDSender(req *http.Request) (*http.Response, error)

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

func (JobClient) ListPreparer

func (client JobClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (JobClient) ListResponder

func (client JobClient) ListResponder(resp *http.Response) (result ListJobListJSONObject, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (JobClient) ListSender

func (client JobClient) ListSender(req *http.Request) (*http.Response, error)

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

func (JobClient) SubmitHiveJob

func (client JobClient) SubmitHiveJob(ctx context.Context, content io.ReadCloser) (result JobSubmissionJSONResponse, err error)

SubmitHiveJob submits a Hive job to an HDInsight cluster. Parameters: content - the content of the Hive job request.

func (JobClient) SubmitHiveJobPreparer

func (client JobClient) SubmitHiveJobPreparer(ctx context.Context, content io.ReadCloser) (*http.Request, error)

SubmitHiveJobPreparer prepares the SubmitHiveJob request.

func (JobClient) SubmitHiveJobResponder

func (client JobClient) SubmitHiveJobResponder(resp *http.Response) (result JobSubmissionJSONResponse, err error)

SubmitHiveJobResponder handles the response to the SubmitHiveJob request. The method always closes the http.Response Body.

func (JobClient) SubmitHiveJobSender

func (client JobClient) SubmitHiveJobSender(req *http.Request) (*http.Response, error)

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

func (JobClient) SubmitMapReduceJob

func (client JobClient) SubmitMapReduceJob(ctx context.Context, content io.ReadCloser) (result JobSubmissionJSONResponse, err error)

SubmitMapReduceJob submits a MapReduce job to an HDInsight cluster. Parameters: content - the content of the MapReduce job request.

func (JobClient) SubmitMapReduceJobPreparer

func (client JobClient) SubmitMapReduceJobPreparer(ctx context.Context, content io.ReadCloser) (*http.Request, error)

SubmitMapReduceJobPreparer prepares the SubmitMapReduceJob request.

func (JobClient) SubmitMapReduceJobResponder

func (client JobClient) SubmitMapReduceJobResponder(resp *http.Response) (result JobSubmissionJSONResponse, err error)

SubmitMapReduceJobResponder handles the response to the SubmitMapReduceJob request. The method always closes the http.Response Body.

func (JobClient) SubmitMapReduceJobSender

func (client JobClient) SubmitMapReduceJobSender(req *http.Request) (*http.Response, error)

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

func (JobClient) SubmitMapReduceStreamingJob

func (client JobClient) SubmitMapReduceStreamingJob(ctx context.Context, content io.ReadCloser) (result JobSubmissionJSONResponse, err error)

SubmitMapReduceStreamingJob submits a MapReduce streaming job to an HDInsight cluster. Parameters: content - the content of the MapReduce job request.

func (JobClient) SubmitMapReduceStreamingJobPreparer

func (client JobClient) SubmitMapReduceStreamingJobPreparer(ctx context.Context, content io.ReadCloser) (*http.Request, error)

SubmitMapReduceStreamingJobPreparer prepares the SubmitMapReduceStreamingJob request.

func (JobClient) SubmitMapReduceStreamingJobResponder

func (client JobClient) SubmitMapReduceStreamingJobResponder(resp *http.Response) (result JobSubmissionJSONResponse, err error)

SubmitMapReduceStreamingJobResponder handles the response to the SubmitMapReduceStreamingJob request. The method always closes the http.Response Body.

func (JobClient) SubmitMapReduceStreamingJobSender

func (client JobClient) SubmitMapReduceStreamingJobSender(req *http.Request) (*http.Response, error)

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

func (JobClient) SubmitPigJob

func (client JobClient) SubmitPigJob(ctx context.Context, content io.ReadCloser) (result JobSubmissionJSONResponse, err error)

SubmitPigJob submits a Pig job to an HDInsight cluster. Parameters: content - the content of the Pig job request.

func (JobClient) SubmitPigJobPreparer

func (client JobClient) SubmitPigJobPreparer(ctx context.Context, content io.ReadCloser) (*http.Request, error)

SubmitPigJobPreparer prepares the SubmitPigJob request.

func (JobClient) SubmitPigJobResponder

func (client JobClient) SubmitPigJobResponder(resp *http.Response) (result JobSubmissionJSONResponse, err error)

SubmitPigJobResponder handles the response to the SubmitPigJob request. The method always closes the http.Response Body.

func (JobClient) SubmitPigJobSender

func (client JobClient) SubmitPigJobSender(req *http.Request) (*http.Response, error)

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

func (JobClient) SubmitSqoopJob

func (client JobClient) SubmitSqoopJob(ctx context.Context, content io.ReadCloser) (result JobSubmissionJSONResponse, err error)

SubmitSqoopJob submits a Sqoop job to an HDInsight cluster. Parameters: content - the content of the Sqoop job request.

func (JobClient) SubmitSqoopJobPreparer

func (client JobClient) SubmitSqoopJobPreparer(ctx context.Context, content io.ReadCloser) (*http.Request, error)

SubmitSqoopJobPreparer prepares the SubmitSqoopJob request.

func (JobClient) SubmitSqoopJobResponder

func (client JobClient) SubmitSqoopJobResponder(resp *http.Response) (result JobSubmissionJSONResponse, err error)

SubmitSqoopJobResponder handles the response to the SubmitSqoopJob request. The method always closes the http.Response Body.

func (JobClient) SubmitSqoopJobSender

func (client JobClient) SubmitSqoopJobSender(req *http.Request) (*http.Response, error)

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

type JobDetailRootJSONObject

type JobDetailRootJSONObject struct {
	autorest.Response `json:"-"`
	// Callback - The callback URL, if any.
	Callback interface{} `json:"callback,omitempty"`
	// Completed - The string representing completed status, for example 'done'.
	Completed *string `json:"completed,omitempty"`
	// ExitValue - The job's exit value.
	ExitValue *int32 `json:"exitValue,omitempty"`
	// ID - The job ID.
	ID *string `json:"id,omitempty"`
	// Msg - The message returned.
	Msg interface{} `json:"msg,omitempty"`
	// ParentID - The parent job ID.
	ParentID *string `json:"parentId,omitempty"`
	// PercentComplete - The job completion percentage, for example '75% complete'.
	PercentComplete *string `json:"percentComplete,omitempty"`
	// Profile - The object containing the job profile information.
	Profile *Profile `json:"profile,omitempty"`
	// Status - The object containing the job status information.
	Status *Status `json:"status,omitempty"`
	// User - The user name of the job creator.
	User *string `json:"user,omitempty"`
	// Userargs - The arguments passed in by the user.
	Userargs *Userargs `json:"userargs,omitempty"`
}

JobDetailRootJSONObject the object containing the job details.

type JobID

type JobID struct {
	// ID - The job number.
	ID *int64 `json:"id,omitempty"`
	// JtIdentifier - The jobTracker identifier.
	JtIdentifier *string `json:"jtIdentifier,omitempty"`
}

JobID the object with the Job ID.

type JobListJSONObject

type JobListJSONObject struct {
	// Detail - The detail of the job.
	Detail *JobDetailRootJSONObject `json:"detail,omitempty"`
	// ID - The Id of the job.
	ID *string `json:"id,omitempty"`
}

JobListJSONObject the List Job operation response.

type JobOperationsErrorResponse

type JobOperationsErrorResponse struct {
	// Error - Error message indicating why the operation failed.
	Error *string `json:"error,omitempty"`
}

JobOperationsErrorResponse describes the format of Error response.

type JobSubmissionJSONResponse

type JobSubmissionJSONResponse struct {
	autorest.Response `json:"-"`
	// ID - The Id of the created job.
	ID *string `json:"id,omitempty"`
}

JobSubmissionJSONResponse the job submission json response.

type ListJobListJSONObject

type ListJobListJSONObject struct {
	autorest.Response `json:"-"`
	Value             *[]JobListJSONObject `json:"value,omitempty"`
}

ListJobListJSONObject ...

type Profile

type Profile struct {
	// JobFile - The job configuration file.
	JobFile *string `json:"jobFile,omitempty"`
	// JobID - The full ID of the job.
	JobID *string `json:"jobId,omitempty"`
	// JobName - The user-specified job name.
	JobName *string `json:"jobName,omitempty"`
	// QueueName - The name of the queue to which the job is submitted.
	QueueName *string `json:"queueName,omitempty"`
	// URL - The link to the web-ui for details of the job.
	URL *string `json:"url,omitempty"`
	// User - The userid of the person who submitted the job.
	User *string `json:"user,omitempty"`
}

Profile the object containing the job profile information.

type Status

type Status struct {
	// CleanupProgress - The progress made on the cleanup.
	CleanupProgress *float64 `json:"cleanupProgress,omitempty"`
	// FailureInfo - The information about any failures that have occurred.
	FailureInfo *string `json:"failureInfo,omitempty"`
	// FinishTime - The time at which the job completed. It is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00.
	FinishTime *int64 `json:"finishTime,omitempty"`
	// HistoryFile - The history file of the job.
	HistoryFile *string `json:"historyFile,omitempty"`
	// JobACLs - The ACLs of the job.
	JobACLs interface{} `json:"jobACLs,omitempty"`
	// JobComplete - Whether or not the job has completed.
	JobComplete *bool `json:"jobComplete,omitempty"`
	// JobFile - The job configuration file.
	JobFile *string `json:"jobFile,omitempty"`
	// JobID - The full ID of the job.
	JobID *string `json:"jobId,omitempty"`
	// JobName - The user-specified job name.
	JobName *string `json:"jobName,omitempty"`
	// JobPriority - The priority of the job.
	JobPriority *string `json:"jobPriority,omitempty"`
	// MapProgress - The progress made on the maps.
	MapProgress *float64 `json:"mapProgress,omitempty"`
	// NeededMem - The amount of memory needed for the job.
	NeededMem *int64 `json:"neededMem,omitempty"`
	// NumReservedSlots - The number of slots reserved.
	NumReservedSlots *int32 `json:"numReservedSlots,omitempty"`
	// NumUsedSlots - The number of slots used for the job.
	NumUsedSlots *int32 `json:"numUsedSlots,omitempty"`
	// Priority - The priority of the job.
	Priority *string `json:"priority,omitempty"`
	// Queue - The job queue name.
	Queue *string `json:"queue,omitempty"`
	// ReduceProgress - The progress made on the reduces.
	ReduceProgress *float64 `json:"reduceProgress,omitempty"`
	// ReservedMem - The amount of memory reserved for the job.
	ReservedMem *int64 `json:"reservedMem,omitempty"`
	// Retired - Whether or not the job has been retired.
	Retired *bool `json:"retired,omitempty"`
	// RunState - The current state of the job.
	RunState *int32 `json:"runState,omitempty"`
	// SchedulingInfo - The information about the scheduling of the job.
	SchedulingInfo *string `json:"schedulingInfo,omitempty"`
	// SetupProgress - The progress made on the setup.
	SetupProgress *float64 `json:"setupProgress,omitempty"`
	// StartTime - The time at which the job started. It is an integer in milliseconds, as a Unix timestamp relative to 1/1/1970 00:00:00.
	StartTime *int64 `json:"startTime,omitempty"`
	// State - The state of the job.
	State *string `json:"state,omitempty"`
	// TrackingURL - The link to the web-ui for details of the job.
	TrackingURL *string `json:"trackingUrl,omitempty"`
	// Uber - Whether job running in uber mode.
	Uber *bool `json:"uber,omitempty"`
	// UsedMem - The amount of memory used by the job.
	UsedMem *int64 `json:"usedMem,omitempty"`
	// Username - The userid of the person who submitted the job.
	Username *string `json:"username,omitempty"`
}

Status gets or sets the object containing the job status information.

type Userargs

type Userargs struct {
	// Arg - READ-ONLY; The list of args defined by the user.
	Arg *[]string `json:"arg,omitempty"`
	// Callback - The callback URL, if any.
	Callback interface{} `json:"callback,omitempty"`
	// Define - READ-ONLY; The define properties defined by the user.
	Define *[]string `json:"define,omitempty"`
	// Enablelog - Whether or not the user enabled logs.
	Enablelog *string `json:"enablelog,omitempty"`
	// Execute - The query defined by the user.
	Execute *string `json:"execute,omitempty"`
	// File - The query file provided by the user.
	File interface{} `json:"file,omitempty"`
	// Files - The files defined by the user.
	Files interface{} `json:"files,omitempty"`
	// Jar - The JAR file provided by the user.
	Jar *string `json:"jar,omitempty"`
	// Statusdir - The status directory defined by the user.
	Statusdir interface{} `json:"statusdir,omitempty"`
}

Userargs gets or sets the object containing the user arguments.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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