You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by iw...@apache.org on 2020/05/25 09:51:46 UTC
[bigtop] branch master updated: BIGTOP-3358: get_roles() function
should fail if a component is not in roles_map (#641)
This is an automated email from the ASF dual-hosted git repository.
iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/master by this push:
new 4c95860 BIGTOP-3358: get_roles() function should fail if a component is not in roles_map (#641)
4c95860 is described below
commit 4c9586044e8d7844d785b2b44936a989c7b62316
Author: masatana <pl...@gmail.com>
AuthorDate: Mon May 25 18:51:37 2020 +0900
BIGTOP-3358: get_roles() function should fail if a component is not in roles_map (#641)
---
bigtop-deploy/puppet/manifests/cluster.pp | 2 +-
.../puppet/modules/bigtop-util/lib/puppet/parser/functions/get_roles.rb | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/bigtop-deploy/puppet/manifests/cluster.pp b/bigtop-deploy/puppet/manifests/cluster.pp
index 95ced2d..ba63945 100644
--- a/bigtop-deploy/puppet/manifests/cluster.pp
+++ b/bigtop-deploy/puppet/manifests/cluster.pp
@@ -54,7 +54,7 @@ $roles_map = {
# mapred is the default app which runs on yarn.
library => ["mapred-app"],
},
- mapred => {
+ mapreduce => {
library => ["mapred-app"],
},
kms => {
diff --git a/bigtop-deploy/puppet/modules/bigtop-util/lib/puppet/parser/functions/get_roles.rb b/bigtop-deploy/puppet/modules/bigtop-util/lib/puppet/parser/functions/get_roles.rb
index 3f78d31..ed7fbe5 100644
--- a/bigtop-deploy/puppet/modules/bigtop-util/lib/puppet/parser/functions/get_roles.rb
+++ b/bigtop-deploy/puppet/modules/bigtop-util/lib/puppet/parser/functions/get_roles.rb
@@ -54,6 +54,8 @@ Puppet::Parser::Functions.newfunction(:get_roles, :type => :rvalue) do |argument
temp_roles = component_map[role_type]
roles.concat(temp_roles)
end
+ else
+ fail Puppet::ParseError, "get_roles(): No such component in roles_map. #{component}"
end
end
end