private void addDependency(Role blockedRole,
      RoleCommand blockedCommand, Role blockerRole, RoleCommand blockerCommand,
      boolean overrideExisting) {
    RoleCommandPair rcp1 = new RoleCommandPair(blockedRole, blockedCommand);
    RoleCommandPair rcp2 = new RoleCommandPair(blockerRole, blockerCommand);

    if (dependencies.get(rcp1) == null || overrideExisting) {
      dependencies.put(rcp1, new HashSet<>());
    }

    dependencies.get(rcp1).add(rcp2);
  }
Add a pair of tuples where the tuple defined by the first two parameters are blocked on
the tuple defined by the last two pair.
@param blockedRole Role that is blocked
@param blockedCommand The command on the role that is blocked
@param blockerRole The role that is blocking
@param blockerCommand The command on the blocking role
ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java