Skip to content

Commit

Permalink
Merge pull request #3114 from ministryofjustice/glue-job-impvmnts
Browse files Browse the repository at this point in the history
Add Spark Resource Parameters for Glue Job
  • Loading branch information
harichintala1 authored Aug 17, 2023
2 parents 4fe1f3e + 1d81226 commit bb480bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"db_description": "DPR Data Catalog",
"create_job": true,
"glue_job_name": "glue-job-ingester",
"reporting_hub_spark_driver_mem": "2g",
"reporting_hub_spark_executor_mem": "2g",
"reporting_hub_spark_log_level": "INFO",
"create_security_conf": true,
"setup_buckets": true,
"create_kinesis_streams": true,
Expand Down Expand Up @@ -36,6 +39,9 @@
"db_description": "DPR Data Catalog",
"create_job": true,
"glue_job_name": "glue-job-ingester",
"reporting_hub_spark_driver_mem": "2g",
"reporting_hub_spark_executor_mem": "2g",
"reporting_hub_spark_log_level": "INFO",
"create_security_conf": true,
"setup_buckets": true,
"create_kinesis_streams": true,
Expand Down Expand Up @@ -66,6 +72,9 @@
"db_description": "DPR Data Catalog",
"create_job": true,
"glue_job_name": "glue-job-ingester",
"reporting_hub_spark_driver_mem": "2g",
"reporting_hub_spark_executor_mem": "2g",
"reporting_hub_spark_log_level": "WARN",
"create_security_conf": true,
"setup_buckets": true,
"create_kinesis_streams": true,
Expand Down Expand Up @@ -96,6 +105,9 @@
"db_description": "DPR Data Catalog",
"create_job": true,
"glue_job_name": "glue-job-ingester",
"reporting_hub_spark_driver_mem": "26g",
"reporting_hub_spark_executor_mem": "26g",
"reporting_hub_spark_log_level": "WARN",
"create_security_conf": true,
"setup_buckets": true,
"create_kinesis_streams": true,
Expand Down
5 changes: 5 additions & 0 deletions terraform/environments/digital-prison-reporting/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ locals {
datamart_username = jsondecode(data.aws_secretsmanager_secret_version.datamart.secret_string)["username"]
datamart_password = jsondecode(data.aws_secretsmanager_secret_version.datamart.secret_string)["password"]

# Glue Job parameters
reporting_hub_driver_mem = local.application_data.accounts[local.environment].reporting_hub_spark_driver_mem
reporting_hub_executor_mem = local.application_data.accounts[local.environment].reporting_hub_spark_executor_mem
reporting_hub_log_level = local.application_data.accounts[local.environment].reporting_hub_spark_log_level

# Common Policies
kms_read_access_policy = "${local.project}_kms_read_policy"
s3_read_access_policy = "${local.project}_s3_read_policy"
Expand Down
3 changes: 3 additions & 0 deletions terraform/environments/digital-prison-reporting/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ module "glue_reporting_hub_job" {
"--dpr.domain.catalog.db" = module.glue_data_domain_database.db_name
"--dpr.redshift.secrets.name" = "${local.project}-redshift-secret-${local.environment}"
"--dpr.datamart.db.name" = "datamart"
"--spark.driver.memory" = local.reporting_hub_driver_mem
"--spark.executor.memory" = local.reporting_hub_executor_mem
"--dpr.log.level" = local.reporting_hub_log_level
}
}

Expand Down

0 comments on commit bb480bf

Please sign in to comment.