Documentation ¶
Index ¶
Constants ¶
View Source
const ( //StatusFail when job fails StatusFail = "FAIL" //StatusPending when job has been validated, but DS has not been created StatusPending = "PENDING" //StatusDeploying when job related resources are being deployed. Used as internal lock StatusDeploying = "DEPLOYING" //StatusDeployed when job related resources have been created in the desired namespace StatusDeployed = "DEPLOYED" //StatusMap when job is in map phase StatusMap = "MAP" //StatusReduce when job is in reduce phase StatusReduce = "REDUCE" //StatusComplete when job has been processed successfully StatusComplete = "COMPLETE" //StatusProgress when job is in progress StatusProgress = "PROGRESS" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client uses a jobs http API
func (*Client) GetJob ¶
func (cl *Client) GetJob() (*MapReduceJob, error)
GetJob gets the job at this baseurl
type Config ¶
type Config struct { //one of https://godoc.org/gopkg.in/amz.v1/aws#pkg-variables ap-northeast-1, ap-southeast-1, etc... S3Region string //The S3 region we wanna use for temporary stuff S3Endpoint string //overrides region BucketName string //A pre-existing bucket BucketPrefix string //Prepended to all keys, to reduce clutter in bucket root JobURL string //The URL for job }
Config holds values required for workers for kubemr internal things Not passed to user code
type MapReduceJob ¶
type MapReduceJob struct { *sync.RWMutex Name string `json:"name"` //Name generated by system Namespace string `json:"namespace"` //Name generated by system Status string `json:"status"` //Status of the job Err string `json:"error"` //Errors, if any Maps map[int]MapTask `json:"maps"` Reduces map[int]ReduceTask `json:"reduces"` Results []string `json:"results"` Replicas *int32 `json:"replicas"` //Number of workers to run in parallel Inputs []string `json:"inputs"` //List of initial inputs for the map phase //UserSecretName string `json:"usersecretname"` //Optional: Name of secret in job's namespace to be available to worker Template v1.PodTemplateSpec `json:"template"` //Pod template for the job // contains filtered or unexported fields }
MapReduceJob defines TPR object for a map-reduce job
func (*MapReduceJob) Init ¶
func (jb *MapReduceJob) Init(cl kubernetes.Interface, addr, myip string, cfg *Config) error
Init initializes the job, setting sane defaults
type MapTask ¶
type MapTask struct { Worker string `json:"worker"` //Hostname, used for locking Input string `json:"input"` //One input per map Outputs map[int]string `json:"outputs"` //Multiple possible outputs Err string `json:"error"` Status string `json:"status"` }
MapTask holds the values for individual map task
type ReduceTask ¶
type ReduceTask struct { Worker string `json:"worker"` //Hostname, used for locking Inputs []string `json:"inputs"` //Multiple possible inputs for a reduce job Output string `json:"output"` //Single output from reduce Err string `json:"error"` Status string `json:"status"` }
ReduceTask holds the values for individual map task
Click to show internal directories.
Click to hide internal directories.