dataprocserverless

package
v0.11.689 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicOperator

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

func NewBasicOperator

func NewBasicOperator(conn config.ConnectionGetter, env map[string]string) (*BasicOperator, error)

func (*BasicOperator) Run

type Client

type Client struct {
	Config
}

func NewClient

func NewClient(c Config) (*Client, error)

type Config

type Config struct {
	ServiceAccountJSON               string   `yaml:"service_account_json,omitempty"`
	ServiceAccountFile               string   `yaml:"service_account_file,omitempty"`
	UseApplicationDefaultCredentials bool     `yaml:"use_application_default_credentials,omitempty"`
	ProjectID                        string   `yaml:"project_id,omitempty"`
	Region                           string   `yaml:"region" json:"region"`
	Workspace                        string   `yaml:"workspace"`
	ExecutionRole                    string   `yaml:"execution_role"`
	SubnetworkURI                    string   `yaml:"subnetwork_uri,omitempty"`
	NetworkTags                      []string `yaml:"network_tags,omitempty"`
	KmsKey                           string   `yaml:"kms_key,omitempty"`
	StagingBucket                    string   `yaml:"staging_bucket,omitempty"`
	MetastoreService                 string   `yaml:"metastore_service,omitempty"`
}

type GCSLogConsumer added in v0.11.649

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

GCSLogConsumer streams the Spark driver output that Dataproc Serverless writes to the batch's staging bucket (RuntimeInfo.OutputUri). This is the same source that `gcloud dataproc batches wait` streams.

We deliberately do not read job logs from Cloud Logging: Dataproc Serverless writes the driver/executor stdout, stderr and log4j output to this GCS location, and that output does not reliably appear in Cloud Logging (only control-plane logs such as the autoscaler do).

func (*GCSLogConsumer) Flush added in v0.11.649

func (l *GCSLogConsumer) Flush() []LogLine

Flush returns any remaining buffered output, including a trailing line that is not newline-terminated. It should be called once after the batch reaches a terminal state.

func (*GCSLogConsumer) Next added in v0.11.649

func (l *GCSLogConsumer) Next() []LogLine

Next returns any complete log lines written since the last call.

func (*GCSLogConsumer) SetOutputURI added in v0.11.649

func (l *GCSLogConsumer) SetOutputURI(uri string)

SetOutputURI records the GCS location of the driver output. Dataproc only populates RuntimeInfo.OutputUri once the batch starts running, so this is called on every poll until a non-empty URI is observed.

type Job

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

func (Job) Run

func (job Job) Run(ctx context.Context) (err error)

type JobRunParams

type JobRunParams struct {
	Project             string
	Region              string
	RuntimeVersion      string
	ContainerImage      string
	Config              string
	Args                []string
	Timeout             time.Duration
	Workspace           string
	ExecutionRole       string
	SubnetworkURI       string
	NetworkTags         []string
	KmsKey              string
	StagingBucket       string
	MetastoreService    string
	Cohort              string
	AutotuningScenarios []dataprocpb.AutotuningConfig_Scenario
}

type LogConsumer

type LogConsumer interface {
	// Next returns log lines produced since the previous call.
	Next() []LogLine
	// Flush returns any remaining buffered output, including a final line not
	// terminated by a newline.
	Flush() []LogLine
	// SetOutputURI points the consumer at the GCS driver-output location.
	SetOutputURI(uri string)
}

type LogLine

type LogLine struct {
	Message string
	Source  string
}

type MissingFieldsError

type MissingFieldsError struct {
	Fields []string
}

func (*MissingFieldsError) Error

func (e *MissingFieldsError) Error() string

type NoOpLogConsumer

type NoOpLogConsumer struct{}

NoOpLogConsumer is a log consumer that does nothing.

func (*NoOpLogConsumer) Flush added in v0.11.649

func (l *NoOpLogConsumer) Flush() []LogLine

func (*NoOpLogConsumer) Next

func (l *NoOpLogConsumer) Next() []LogLine

func (*NoOpLogConsumer) SetOutputURI added in v0.11.649

func (l *NoOpLogConsumer) SetOutputURI(string)

Jump to

Keyboard shortcuts

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