Skip to content

Commit

Permalink
Merge pull request #137 from ExpediaGroup/feature/traffic_switch
Browse files Browse the repository at this point in the history
Feature/traffic switch
  • Loading branch information
Patrick Duin authored Feb 9, 2024
2 parents 8696cd5 + ff32e98 commit efa0963
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `<list>` | no |
| primary_metastore_mapped_databases | List of Hive databases mapped from primary Metastore. | list | `<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 | `<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 | `<list>` | no |
| secondary_vpcs | List of VPCs to associate with Service Discovery namespace. | list | `<list>` | no |
Expand Down
2 changes: 2 additions & 0 deletions templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
3 changes: 3 additions & 0 deletions templates/waggle-dance-federation.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" ~}
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit efa0963

Please sign in to comment.