-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new: dev: ACM-6082: Support cluster notifications in sdk #327
Merged
chattarajoy
merged 8 commits into
qubole:unreleased
from
vasantchaitanyamahipala:acmclus
Jul 17, 2020
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ba182af
dev
vasantm7 6bc3494
dev
vasantm7 28d25bf
dev
vasantm7 dd10bf1
dev
vasantm7 0f54abd
dev
vasantm7 66714de
dev
vasantm7 e3dd7db
Merge branch 'unreleased' into acmclus
chattarajoy 425fee7
dev
vasantm7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -148,6 +148,7 @@ def set_cluster_info_from_arguments(self, arguments): | |
enable_ganglia_monitoring=arguments.enable_ganglia_monitoring, | ||
datadog_api_token=arguments.datadog_api_token, | ||
datadog_app_token=arguments.datadog_app_token, | ||
notifications=arguments.notifications, | ||
node_bootstrap=arguments.node_bootstrap_file, | ||
master_instance_type=arguments.master_instance_type, | ||
slave_instance_type=arguments.slave_instance_type, | ||
|
@@ -190,6 +191,7 @@ def set_cluster_info(self, | |
enable_ganglia_monitoring=None, | ||
datadog_api_token=None, | ||
datadog_app_token=None, | ||
notifications=None, | ||
node_bootstrap=None, | ||
master_instance_type=None, | ||
slave_instance_type=None, | ||
|
@@ -316,6 +318,8 @@ def set_cluster_info(self, | |
|
||
`datadog_app_token` : Specify the Datadog APP token to use the Datadog monitoring service | ||
|
||
`notifications` : Specify the list of notification channels | ||
|
||
`image_uri_overrides` : Override the image name provided | ||
|
||
`env_name`: Name of python and R environment. (For Spark clusters) | ||
|
@@ -374,7 +378,7 @@ def set_cluster_info(self, | |
stable_spot_fallback) | ||
self.set_spot_block_settings(spot_block_duration) | ||
self.set_data_disk(disk_size, disk_count, disk_type, upscaling_config, enable_encryption) | ||
self.set_monitoring(enable_ganglia_monitoring, datadog_api_token, datadog_app_token) | ||
self.set_monitoring(enable_ganglia_monitoring, datadog_api_token, datadog_app_token, notifications) | ||
self.set_internal(image_uri_overrides) | ||
self.set_env_settings(env_name, python_version, r_version) | ||
self.set_start_stop_settings(disable_cluster_pause, paused_cluster_timeout_mins, | ||
|
@@ -387,12 +391,18 @@ def set_datadog_setting(self, | |
self.monitoring['datadog']['datadog_api_token'] = datadog_api_token | ||
self.monitoring['datadog']['datadog_app_token'] = datadog_app_token | ||
|
||
def set_notification_settings(self, notifications): | ||
self.monitoring["notifications"] = {} | ||
self.monitoring["notifications"]["all"] = notifications | ||
|
||
def set_monitoring(self, | ||
enable_ganglia_monitoring=None, | ||
datadog_api_token=None, | ||
datadog_app_token=None): | ||
datadog_app_token=None, | ||
notifications=None): | ||
self.monitoring['ganglia'] = enable_ganglia_monitoring | ||
self.set_datadog_setting(datadog_api_token, datadog_app_token) | ||
self.set_notification_settings(notifications) | ||
|
||
def set_spot_instance_settings(self, | ||
maximum_bid_price_percentage=None, | ||
|
@@ -693,6 +703,13 @@ def cluster_info_parser(argparser, action): | |
dest="datadog_app_token", | ||
default=None, | ||
help="overrides for airflow cluster", ) | ||
notifications_group = argparser.add_argument_group("notifications") | ||
notifications_group.add_argument("--notifications", | ||
nargs="*", | ||
type=int, | ||
dest="notifications", | ||
default=None, | ||
help="List of notification channels", ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. List of notification channel ids |
||
|
||
internal_group = argparser.add_argument_group("internal settings") | ||
internal_group.add_argument("--image-overrides", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notification channel ids
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the parameter me
notifications _channels
instead?