Class AirflowRESTClient
- java.lang.Object
-
- org.openmetadata.sdk.PipelineServiceClient
-
- org.openmetadata.service.clients.pipeline.airflow.AirflowRESTClient
-
public class AirflowRESTClient extends PipelineServiceClient
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpClientclientprotected Stringpasswordprotected URLserviceURLprotected Stringusername-
Fields inherited from class org.openmetadata.sdk.PipelineServiceClient
AUTH_HEADER, CONTENT_HEADER, CONTENT_TYPE, HEALTHY_STATUS, hostIp, ingestionIpInfoEnabled, SERVER_VERSION, STATUS_KEY, TYPE_TO_TASK, UNHEALTHY_STATUS
-
-
Constructor Summary
Constructors Constructor Description AirflowRESTClient(PipelineServiceClientConfiguration config)
-
Method Summary
-
Methods inherited from class org.openmetadata.sdk.PipelineServiceClient
buildHealthyStatus, buildUnhealthyStatus, buildVersionMismatchErrorMessage, getBasicAuthenticationHeader, getHostIp, getPlatform, getServerVersion, getServiceStatusBackoff, getVersionFromString, setPlatform, validateServiceURL, validServerClientVersions
-
-
-
-
Field Detail
-
username
protected final String username
-
password
protected final String password
-
client
protected final HttpClient client
-
serviceURL
protected final URL serviceURL
-
-
Constructor Detail
-
AirflowRESTClient
public AirflowRESTClient(PipelineServiceClientConfiguration config) throws KeyStoreException
- Throws:
KeyStoreException
-
-
Method Detail
-
post
public final HttpResponse<String> post(String endpoint, String payload, boolean authenticate) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
post
public final HttpResponse<String> post(String endpoint, String payload) throws IOException, InterruptedException
- Throws:
IOExceptionInterruptedException
-
deployPipeline
public PipelineServiceClientResponse deployPipeline(IngestionPipeline ingestionPipeline, ServiceEntityInterface service)
- Specified by:
deployPipelinein classPipelineServiceClient
-
deletePipeline
public PipelineServiceClientResponse deletePipeline(IngestionPipeline ingestionPipeline)
- Specified by:
deletePipelinein classPipelineServiceClient
-
runPipeline
public PipelineServiceClientResponse runPipeline(IngestionPipeline ingestionPipeline, ServiceEntityInterface service)
- Specified by:
runPipelinein classPipelineServiceClient
-
toggleIngestion
public PipelineServiceClientResponse toggleIngestion(IngestionPipeline ingestionPipeline)
- Specified by:
toggleIngestionin classPipelineServiceClient
-
getQueuedPipelineStatus
public List<PipelineStatus> getQueuedPipelineStatus(IngestionPipeline ingestionPipeline)
- Specified by:
getQueuedPipelineStatusin classPipelineServiceClient
-
getServiceStatus
public PipelineServiceClientResponse getServiceStatus()
Scenarios handled here: 1. Failed to access Airflow APIs: No response from Airflow; APIs might not be installed 2. Auth failed when accessing Airflow APIs 3. Different versions between server and client- Specified by:
getServiceStatusin classPipelineServiceClient
-
runAutomationsWorkflow
public PipelineServiceClientResponse runAutomationsWorkflow(Workflow workflow)
- Specified by:
runAutomationsWorkflowin classPipelineServiceClient
-
killIngestion
public PipelineServiceClientResponse killIngestion(IngestionPipeline ingestionPipeline)
- Specified by:
killIngestionin classPipelineServiceClient
-
requestGetHostIp
public Map<String,String> requestGetHostIp()
- Specified by:
requestGetHostIpin classPipelineServiceClient
-
getLastIngestionLogs
public Map<String,String> getLastIngestionLogs(IngestionPipeline ingestionPipeline, String after)
- Specified by:
getLastIngestionLogsin classPipelineServiceClient
-
-