I am trying to access the current status of a data pipeline from Java Data Pipeline client. My use case is to activate a pipeline and wait till it's in completed state. I tried the answer from this thread: AWS Data Pipeline - Components, Instances and Attempts and Pipeline Status but I am only getting the current state as Scheduled even though the pipeline is in running state. This my code snippet:
DescribePipelinesRequest describePipelinesRequest = new DescribePipelinesRequest();
describePipelinesRequest.setPipelineIds(Arrays.asList(pipelineId));
final DescribePipelinesResult describePipelinesResult =
dataPipelineClient.describePipelines(describePipelinesRequest);
final List<Field> testPipeline =
describePipelinesResult.getPipelineDescriptionList().get(0).getFields();
for (Field field : testPipeline) {
log.debug("Field: {} and {}", field.getKey(), field.getStringValue());
if (field.getKey().equals("@pipelineState")) {
log.debug("Pipeline state current: {} and {}", field.getStringValue());
}
}
Has anyone faced issues like this before? Btw, this pipeline has been made a on trigger pipeline scheduled to run every 100 years. We need to trigger this pipeline manually.