diff --git a/CHANGELOG.md b/CHANGELOG.md index a2d1f55..0008378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [4.3.0] - 2024-02-08 +### Added +- Variable to add a readonly primary optional host/port. Waggle Dance will redirect get calls automatically to those. + ## [4.2.2] - 2024-01-05 ### Fixed - Conditional reading of Secrets from SecretManager fix. diff --git a/README.md b/README.md index 91d8211..4dc8844 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,8 @@ For more information please refer to the main [Apiary](https://github.com/Expedi | primary_metastore_glue_endpoint | Primary metastore Glue endpoint `glue.us-east-1.amazonaws.com`, optional. Use with `primary_metastore_glue_account_id` and instead of `primary_metastore_host` and `primary_metastore_port` | string | `` | no | | primary_metastore_whitelist | List of Hive databases to whitelist on primary Metastore. | list | `` | no | | primary_metastore_mapped_databases | List of Hive databases mapped from primary Metastore. | list | `` | no | +| primary_metastore_read_only_host | Primary Hive Metastore READ ONLY hostname configured in Waggle Dance. Optional. | string | `` | no | +| primary_metastore_read_only_port | Primary Hive Metastore READ ONLY port configured in Waggle Dance. Optional. | string | `9083` | no | | remote_metastores | List of VPC endpoint services to federate Metastores in other accounts. See section [`remote_metastores`](#remote_metastores) for more info. | list | `` | no | | remote_region_metastores | List of VPC endpoint services to federate Metastores in other region,other accounts. The actual data from tables in these metastores can be accessed using Alluxio caching instead of reading the data from S3 directly. See section [`remote_region_metastores`](#remote_region_metastores) for more info. | list | `` | no | | secondary_vpcs | List of VPCs to associate with Service Discovery namespace. | list | `` | no | diff --git a/templates.tf b/templates.tf index 813d755..fee7052 100644 --- a/templates.tf +++ b/templates.tf @@ -164,6 +164,8 @@ data "template_file" "federation_yaml" { remote_region_metastores = join("", data.template_file.remote_region_metastores_yaml.*.rendered) ssh_metastores = join("", data.template_file.ssh_metastores_yaml.*.rendered) glue_metastores = join("", data.template_file.glue_metastores_yaml.*.rendered) + primary_metastore_read_only_host = var.primary_metastore_read_only_host + primary_metastore_read_only_port = var.primary_metastore_read_only_port } } diff --git a/templates/waggle-dance-federation.yml.tmpl b/templates/waggle-dance-federation.yml.tmpl index cf59d24..426bd3f 100644 --- a/templates/waggle-dance-federation.yml.tmpl +++ b/templates/waggle-dance-federation.yml.tmpl @@ -8,6 +8,9 @@ primary-meta-store: glue-endpoint: ${primary_metastore_glue_endpoint} %{else~} remote-meta-store-uris: thrift://${primary_metastore_host}:${primary_metastore_port} +%{if primary_metastore_read_only_host != "" ~} + read-only-remote-meta-store-uris: thrift://${primary_metastore_read_only_host}:${primary_metastore_read_only_port} +%{endif~} %{endif~} latency: ${primary_metastore_latency} %{if primary_metastore_mapped_databases != "" ~} diff --git a/variables.tf b/variables.tf index 24a51ab..64724a1 100644 --- a/variables.tf +++ b/variables.tf @@ -199,6 +199,18 @@ variable "primary_metastore_port" { default = "9083" } +variable "primary_metastore_read_only_host" { + description = "Primary Hive Metastore READ ONLY hostname configured in Waggle Dance. Optional." + type = string + default = "" +} + +variable "primary_metastore_read_only_port" { + description = "Primary Hive Metastore READ ONLY port configured in Waggle Dance. Optional." + type = string + default = "9083" +} + variable "primary_metastore_glue_account_id" { description = "Primary metastore Glue AWS account id, optional. Use with 'primary_metastore_glue_endpoint' and instead of 'primary_metastore_host/primary_metastore_port'" type = string