@Override public TimelineDomains getDomains(String owner) throws IOException { return summaryStore.getDomains(owner); }
@Override public TimelineDomains getDomains(String owner) throws IOException { return summaryStore.getDomains(owner); }
@Override public TimelineDomains getDomains(String owner) throws IOException { return summaryStore.getDomains(owner); }
private TimelineDomains doGetDomains(String owner, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomains domains = store.getDomains(owner); boolean hasAccess = true; if (domains.getDomains().size() > 0) { // The owner for each domain is the same, just need to check one hasAccess = timelineACLsManager.checkAccess( callerUGI, domains.getDomains().get(0)); } if (hasAccess) { return domains; } else { return new TimelineDomains(); } }
/** * Get all the domains that belong to the given owner. If callerUGI is not * the owner or the admin of the domain, empty list is going to be returned. */ public TimelineDomains getDomains(String owner, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomains domains = store.getDomains(owner); boolean hasAccess = true; if (domains.getDomains().size() > 0) { // The owner for each domain is the same, just need to check one hasAccess = timelineACLsManager.checkAccess( callerUGI, domains.getDomains().get(0)); } if (hasAccess) { return domains; } else { return new TimelineDomains(); } }
/** * Get all the domains that belong to the given owner. If callerUGI is not * the owner or the admin of the domain, empty list is going to be returned. */ public TimelineDomains getDomains(String owner, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomains domains = store.getDomains(owner); boolean hasAccess = true; if (domains.getDomains().size() > 0) { // The owner for each domain is the same, just need to check one hasAccess = timelineACLsManager.checkAccess( callerUGI, domains.getDomains().get(0)); } if (hasAccess) { return domains; } else { return new TimelineDomains(); } }
public void testGetDomains() throws IOException { TimelineDomains actualDomains = store.getDomains("owner_1"); assertEquals(2, actualDomains.getDomains().size()); verifyDomainInfo(domain3, actualDomains.getDomains().get(0)); verifyDomainInfo(domain1, actualDomains.getDomains().get(1)); // owner without any domain actualDomains = store.getDomains("owner_4"); assertEquals(0, actualDomains.getDomains().size()); }