Ejemplo n.º 1
0
def create_EMR_cluster(cluster_name, emr_version, subnet_ids):
    cluster_id = EmrClusterController.create_cluster_job_execution(cluster_name, emr_version, subnet_ids)
    print("Waiting for Cluster: ", cluster_id)
    xcom_return = {"clusterId": cluster_id}

    with open("/airflow/xcom/return.json", "w") as file:
        json.dump(xcom_return, file)

    return EmrClusterController.wait_for_cluster_creation(cluster_id)
Ejemplo n.º 2
0
def create_emr_cluster(**kwargs):
    cluster_id = EmrClusterController.create_cluster_job_execution(
        "Livy Cluster", "emr-5.30.0")
    return cluster_id