Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ public String getFrameworkName() {
}

public String getFrameworkRole() {
if (frameworkRole.contains("/")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ hokiegeek2, sorry but I think this does not solve the problem. Maybe it's because the code has changed and the patch test does not make sense with the current code. The current problem is that we are treating the default role 'asterisk' as if it were a real role and the behavior has to be as if it were not a role. When the role is 'asterisk', "frameworkRole.contains (" / ")" returns false and never executes the statement "return frameworkRole.replace (" / "," ");", then it continues to fail. I think that the error is produced by the treatment of the role 'asterisc' in "ResourceOfferContainer.setScalarValues", it would be necessary that the behavior of this function with role 'asterisk' was equal to a roleless one. What do you think?

return frameworkRole.replace("/", "");
}
return frameworkRole;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ mesosMaster: 10.0.2.15:5050
checkpoint: false
frameworkFailoverTimeout: 43200000
frameworkName: MyriadAlpha
frameworkRole:
# For the mesos * role, must surround with quotes to prevent yaml parsing error
frameworkRole: '*'
frameworkUser: hduser # User the Node Manager runs as, required if nodeManagerURI set, otherwise defaults to the user
# running the resource manager.
frameworkSuperUser: root # To be depricated, currently permissions need set by a superuser due to Mesos-1790. Must be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,9 @@ public void additionalPropertiestest() throws Exception {
assertEquals(taskName, outTaskname);
}
}

}

@Test
public void testFrameworkRole() throws Exception {
assertEquals("*", cfg.getFrameworkRole());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ mesosMaster: 10.0.2.15:5050
checkpoint: false
frameworkFailoverTimeout: 43200000
frameworkName: MyriadTest
frameworkRole:
# For the mesos * role, must surround with quotes to prevent yaml parsing error
frameworkRole: '*'
frameworkUser: hduser # User the Node Manager runs as, required if nodeManagerURI set, otherwise defaults to the user
# running the resource manager.
frameworkSuperUser: root # To be depricated, currently permissions need set by a superuser due to Mesos-1790. Must be
Expand Down