问题
Documentation on AWS Data Pipeline describes the Data Pipeline related concepts of Components, Instances and Attempts here.
http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-how-tasks-scheduled.html
I am trying to identify the status of a data pipeline ( whether its running or finished) using DescribeObjects API method described here.
https://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DescribeObjects.html
Using this API method I can get the status of a particular object using @status field.
To identify whether a data pipeline is in running state or in some other state, does it suffice to check objects in "INSTANCE" state? or do I need to check objects in "COMPONENT" state and "ATTEMPT" state as well?
回答1:
If you are looking for the overall state of the pipeline, you could use DescribePipeline as opposed to DescribeObjects. https://docs.aws.amazon.com/datapipeline/latest/APIReference/API_DescribePipelines.html
There is an attribute called pipelineState
which will tell you the state/status of the pipeline. I"ve seen the following pipeline states
"RUNNING", "VALIDATING", "WAITING_FOR_RUNNER", "WAITING_FOR_DEPENDENCIES", "ACTIVATING", "SCHEDULED", "PENDING", "FINISHED", "INACTIVE"
来源:https://stackoverflow.com/questions/47027717/aws-data-pipeline-components-instances-and-attempts-and-pipeline-status