Amazon EMR --wait-for-steps -
I am writing a bash script which runs an AOSMR command (ALS MR version 1.5.2).
How do I wait for my script to finish the MR job before moving ahead? - Step for waiting
is now discarded.
I have found this, but it looks just like the wrong approach:
STEP_STATUS_STATE = $ (AS AMR list-step - cluster-id $ {CLUSTER_ID} } | Jq '. Phase [0]. Status.State' | tr -d '"') while while [[$ {STEP_STATUS_STATE} == pending]]] [[$ {STEP_STATUS_STATE} == walking]] SEEEEEEEETE = $ (AS A MR List-Steps - Cluster-ID $ {CLUSTER_ID} | Junk '.' Steps [0]. TetasState '| Tr -d' '') Resonance $ (date) $ {STEP_STATUS_STATE} Gone
I go AVS Or wait until the use of the API has expired, as long as the work has ended. Hope this helps
Public stable final list & amp; Job Flow Exclusions State & gt; DONE_STATES = Arrays .asList (New Jobflow Execution State [] {JobFlowExecutionState.COMPLETED, JobFlowExecutionState.FAILED, JobFlowExecutionState.TERMINATED});
...
public stable boolean headphones (string value) {JobFlowExecutionState state = JobFlowExecutionState.fromValue (value); Return static DONE_STATESContains (state); }. STATUS_LOOP: While (true) {description jobflowsRequest desc = new description jobflowsRequest (arrays.asList (new string [] {result.getJobFlowId ()})); Describejobflousse descsesult = emr.describeJobFlows (desc); (JobFlowDetail extension for: descResult.getJobFlows ()) {String State = Extension.Getextension Station Detail (). GetState (); If (isdone (state)) {logger.info ("work" + state + ":" + detail.toString ()); If (loadToDailyDB & state.AJNLSIISLSSSC ("COMPLETED")} {// do something} if (! State.Ageler Ignore CAS ("COMPLETED")) {} breaks STATUS_LOOP; } And if (LastState.Ageal (state)) {FinalState = State; Logger.info ("Job" + State + "on" + New Date (). ToString ()); }} Thread.sleep (75000);
Comments
Post a Comment