Reduced the instantiation of transitiveGroupsById by avoiding it in the group function.
Details
Details
- Reviewers
aquamatthias timcharper • jasongilanfarr - Commits
- rMARATHONbed46d122dd8: Reverted the `group` function to not use `transitiveGroupsById`.
rMARATHONe2a01e1da095: Reverted the `group` function to not use `transitiveGroupsById`.
rMARATHONc8b1742efb8b: Reverted the `group` function to not use `transitiveGroupsById`.
sbt test
Diff Detail
Diff Detail
- Repository
- rMARATHON marathon
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
Build is green https://jenkins.mesosphere.com/service/jenkins/job/public-test-marathon-phabricator/685/ for more details.
src/main/scala/mesosphere/marathon/state/Group.scala | ||
---|---|---|
47 | I’m finding this code quite difficult to parse. Can we add some documentation to how the method works? |
src/main/scala/mesosphere/marathon/state/Group.scala | ||
---|---|---|
47 | how about this? /** * Find and return the child group for the given path. If no match is found, then returns None */ def group(gid: PathId): Option[Group] = { if (id == gid) Some(this) else { val immediateChild = gid.restOf(id).root groupsById.find { case (_, group) => group.id.restOf(id).root == immediateChild } .flatMap { case (_, group) => group.group(gid) } } } |
Comment Actions
Build has FAILED
Link to build: https://jenkins.mesosphere.com/service/jenkins/job/public-test-marathon-phabricator/690/
See console output for more information: https://jenkins.mesosphere.com/service/jenkins/job/public-test-marathon-phabricator/690/console
I’m finding this code quite difficult to parse. Can we add some documentation to how the method works?