1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00
fog--fog-aws/tests/requests/emr/helper.rb

168 lines
4.9 KiB
Ruby
Raw Normal View History

2015-01-02 12:34:40 -05:00
class AWS
module EMR
module Formats
BASIC = {
'RequestId' => String
}
RUN_JOB_FLOW = BASIC.merge({
'JobFlowId' => String
})
ADD_INSTANCE_GROUPS = {
'JobFlowId' => String,
'InstanceGroupIds' => Array
}
SIMPLE_DESCRIBE_JOB_FLOW = {
'JobFlows' => [{
'Name' => String,
'BootstrapActions' => {
'ScriptBootstrapActionConfig' => {
'Args' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String,
'LastStateChangeReason' => String
},
'Steps' => [{
'ActionOnFailure' => String,
'Name' => String,
'StepConfig' => {
'HadoopJarStepConfig' => {
'MainClass' => String,
'Jar' => String,
'Args' => Array,
'Properties' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String
}
}],
'JobFlowId' => String,
'Instances' => {
'InstanceCount' => String,
'NormalizedInstanceHours' => String,
'KeepJobFlowAliveWhenNoSteps' => String,
'Placement' => {
'AvailabilityZone' => String
},
'MasterInstanceType' => String,
'SlaveInstanceType' => String,
'InstanceGroups' => Array,
'TerminationProtected' => String,
'HadoopVersion' => String
}
}]
}
JOB_FLOW_WITHOUT_CHANGE = {
'JobFlows' => [{
'Name' => String,
'BootstrapActions' => {
'ScriptBootstrapActionConfig' => {
'Args' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String,
'LastStateChangeReason' => NilClass
},
'Steps' => [{
'ActionOnFailure' => String,
'Name' => String,
'StepConfig' => {
'HadoopJarStepConfig' => {
'MainClass' => String,
'Jar' => String,
'Args' => Array,
'Properties' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String
}
}],
'JobFlowId' => String,
'Instances' => {
'InstanceCount' => String,
'NormalizedInstanceHours' => String,
'KeepJobFlowAliveWhenNoSteps' => String,
'Placement' => {
'AvailabilityZone' => String
},
'MasterInstanceType' => String,
'SlaveInstanceType' => String,
'InstanceGroups' => Array,
'TerminationProtected' => String,
'HadoopVersion' => String
}
}]
}
DESCRIBE_JOB_FLOW_WITH_INSTANCE_GROUPS = {
'JobFlows' => [{
'Name' => String,
'BootstrapActions' => {
'ScriptBootstrapActionConfig' => {
'Args' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String,
'LastStateChangeReason' => NilClass
},
'Steps' => [{
'ActionOnFailure' => String,
'Name' => String,
'StepConfig' => {
'HadoopJarStepConfig' => {
'MainClass' => String,
'Jar' => String,
'Args' => Array,
'Properties' => Array
}
},
'ExecutionStatusDetail' => {
'CreationDateTime' => String,
'State' => String
}
}],
'JobFlowId' => String,
'Instances' => {
'InstanceCount' => String,
'NormalizedInstanceHours' => String,
'KeepJobFlowAliveWhenNoSteps' => String,
'Placement' => {
'AvailabilityZone' => String
},
'InstanceGroups' => [{
'Name' => String,
'InstanceRole' => String,
'CreationDateTime' => String,
'LastStateChangeReason' => nil,
'InstanceGroupId' => String,
'Market' => String,
'InstanceType' => String,
'State' => String,
'InstanceRunningCount' => String,
'InstanceRequestCount' => String
}],
'MasterInstanceType' => String,
'SlaveInstanceType' => String,
'TerminationProtected' => String,
'HadoopVersion' => String
}
}]
}
end
end
end