elasticmapreduce

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name    string
	Version string
}

Application represents an installed application.

type Cluster

type Cluster struct {
	ID                      string
	Name                    string
	ARN                     string
	Status                  ClusterStatus
	ReleaseLabel            string
	Applications            []Application
	LogUri                  string
	ServiceRole             string
	JobFlowRole             string
	MasterPublicDnsName     string
	NormalizedInstanceHours int
	VisibleToAllUsers       bool
	TerminationProtected    bool
	AutoTerminate           bool
	Tags                    map[string]string
	Lifecycle               *lifecycle.Machine
}

Cluster represents an EMR cluster.

type ClusterStatus

type ClusterStatus struct {
	State string
}

ClusterStatus holds cluster state info.

type EMRService

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

EMRService is the cloudmock implementation of the AWS EMR API.

func New

func New(accountID, region string) *EMRService

New returns a new EMRService for the given AWS account ID and region.

func (*EMRService) Actions

func (s *EMRService) Actions() []service.Action

Actions returns the list of EMR API actions supported by this service.

func (*EMRService) HandleRequest

func (s *EMRService) HandleRequest(ctx *service.RequestContext) (*service.Response, error)

HandleRequest routes an incoming EMR request to the appropriate handler.

func (*EMRService) HealthCheck

func (s *EMRService) HealthCheck() error

HealthCheck always returns nil.

func (*EMRService) Name

func (s *EMRService) Name() string

Name returns the AWS service name used for routing.

func (*EMRService) SetLocator

func (s *EMRService) SetLocator(locator ServiceLocator)

SetLocator sets the service locator for cross-service lookups (e.g., EC2).

type HadoopJarStepConfig

type HadoopJarStepConfig struct {
	Jar        string
	MainClass  string
	Args       []string
	Properties map[string]string
}

HadoopJarStepConfig holds step configuration.

type InstanceGroup

type InstanceGroup struct {
	ID            string
	Name          string
	ClusterID     string
	InstanceRole  string // MASTER, CORE, TASK
	InstanceType  string
	InstanceCount int
	Market        string
	Status        InstanceGroupStatus
}

InstanceGroup represents an EMR instance group.

type InstanceGroupStatus

type InstanceGroupStatus struct {
	State string
}

InstanceGroupStatus holds instance group state.

type SecurityConfiguration

type SecurityConfiguration struct {
	Name                  string
	SecurityConfiguration string // JSON blob
	CreationDateTime      time.Time
}

SecurityConfiguration represents an EMR security configuration.

type ServiceLocator

type ServiceLocator interface {
	Lookup(name string) (service.Service, error)
}

ServiceLocator resolves other services by name.

type Step

type Step struct {
	ID     string
	Name   string
	Status StepStatus
	Config HadoopJarStepConfig
}

Step represents an EMR step.

type StepStatus

type StepStatus struct {
	State string
}

StepStatus holds step state.

type Store

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

Store manages all EMR resources in memory.

func NewStore

func NewStore(accountID, region string) *Store

NewStore creates a new EMR Store.

func (*Store) AddInstanceGroups

func (s *Store) AddInstanceGroups(clusterID string, groups []InstanceGroup) ([]string, bool)

func (*Store) AddSteps

func (s *Store) AddSteps(clusterID string, steps []Step) ([]string, bool)

func (*Store) AddTags

func (s *Store) AddTags(resourceID string, tags map[string]string) bool

func (*Store) CreateSecurityConfiguration

func (s *Store) CreateSecurityConfiguration(name, config string) (*SecurityConfiguration, error)

CreateSecurityConfiguration creates a new security configuration.

func (*Store) DeleteSecurityConfiguration

func (s *Store) DeleteSecurityConfiguration(name string) bool

DeleteSecurityConfiguration removes a security configuration.

func (*Store) DescribeSecurityConfiguration

func (s *Store) DescribeSecurityConfiguration(name string) (*SecurityConfiguration, bool)

DescribeSecurityConfiguration returns a security configuration by name.

func (*Store) GetCluster

func (s *Store) GetCluster(id string) (*Cluster, bool)

func (*Store) GetStep

func (s *Store) GetStep(clusterID, stepID string) (*Step, bool)

func (*Store) ListClusters

func (s *Store) ListClusters(states []string) []*Cluster

func (*Store) ListInstanceGroups

func (s *Store) ListInstanceGroups(clusterID string) []*InstanceGroup

func (*Store) ListSecurityConfigurations

func (s *Store) ListSecurityConfigurations() []*SecurityConfiguration

ListSecurityConfigurations returns all security configurations.

func (*Store) ListSteps

func (s *Store) ListSteps(clusterID string) []*Step

func (*Store) ModifyInstanceGroups

func (s *Store) ModifyInstanceGroups(clusterID string, modifications map[string]int) bool

func (*Store) RemoveTags

func (s *Store) RemoveTags(resourceID string, keys []string) bool

func (*Store) RunJobFlow

func (s *Store) RunJobFlow(name, releaseLabel, logUri, serviceRole, jobFlowRole string, apps []Application, tags map[string]string) *Cluster

func (*Store) SetLocator

func (s *Store) SetLocator(locator ServiceLocator)

SetLocator sets the service locator for cross-service lookups.

func (*Store) SetTerminationProtection

func (s *Store) SetTerminationProtection(ids []string, protected bool)

func (*Store) SetVisibleToAllUsers

func (s *Store) SetVisibleToAllUsers(ids []string, visible bool)

func (*Store) TerminateJobFlows

func (s *Store) TerminateJobFlows(ids []string)

Jump to

Keyboard shortcuts

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