Documentation
¶
Index ¶
- type Application
- type Cluster
- type ClusterStatus
- type EMRService
- type HadoopJarStepConfig
- type InstanceGroup
- type InstanceGroupStatus
- type SecurityConfiguration
- type ServiceLocator
- type Step
- type StepStatus
- type Store
- func (s *Store) AddInstanceGroups(clusterID string, groups []InstanceGroup) ([]string, bool)
- func (s *Store) AddSteps(clusterID string, steps []Step) ([]string, bool)
- func (s *Store) AddTags(resourceID string, tags map[string]string) bool
- func (s *Store) CreateSecurityConfiguration(name, config string) (*SecurityConfiguration, error)
- func (s *Store) DeleteSecurityConfiguration(name string) bool
- func (s *Store) DescribeSecurityConfiguration(name string) (*SecurityConfiguration, bool)
- func (s *Store) GetCluster(id string) (*Cluster, bool)
- func (s *Store) GetStep(clusterID, stepID string) (*Step, bool)
- func (s *Store) ListClusters(states []string) []*Cluster
- func (s *Store) ListInstanceGroups(clusterID string) []*InstanceGroup
- func (s *Store) ListSecurityConfigurations() []*SecurityConfiguration
- func (s *Store) ListSteps(clusterID string) []*Step
- func (s *Store) ModifyInstanceGroups(clusterID string, modifications map[string]int) bool
- func (s *Store) RemoveTags(resourceID string, keys []string) bool
- func (s *Store) RunJobFlow(name, releaseLabel, logUri, serviceRole, jobFlowRole string, ...) *Cluster
- func (s *Store) SetLocator(locator ServiceLocator)
- func (s *Store) SetTerminationProtection(ids []string, protected bool)
- func (s *Store) SetVisibleToAllUsers(ids []string, visible bool)
- func (s *Store) TerminateJobFlows(ids []string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
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 ¶
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 Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages all EMR resources in memory.
func (*Store) AddInstanceGroups ¶
func (s *Store) AddInstanceGroups(clusterID string, groups []InstanceGroup) ([]string, bool)
func (*Store) CreateSecurityConfiguration ¶
func (s *Store) CreateSecurityConfiguration(name, config string) (*SecurityConfiguration, error)
CreateSecurityConfiguration creates a new security configuration.
func (*Store) DeleteSecurityConfiguration ¶
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) ListClusters ¶
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) ModifyInstanceGroups ¶
func (*Store) RunJobFlow ¶
func (*Store) SetLocator ¶
func (s *Store) SetLocator(locator ServiceLocator)
SetLocator sets the service locator for cross-service lookups.