@Override public TimelineDomain getDomain(String domainId) throws IOException { return summaryStore.getDomain(domainId); }
@Override public TimelineDomain getDomain(String domainId) throws IOException { return summaryStore.getDomain(domainId); }
@Override public TimelineDomain getDomain(String domainId) throws IOException { return summaryStore.getDomain(domainId); }
private AccessControlListExt loadDomainFromTimelineStore( String domainId) throws IOException { if (store == null) { return null; } TimelineDomain domain = store.getDomain(domainId); if (domain == null) { return null; } else { return putDomainIntoCache(domain); } }
/** * Get a single domain of the particular ID. If callerUGI is not the owner * or the admin of the domain, null will be returned. */ public TimelineDomain getDomain(String domainId, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain domain = store.getDomain(domainId); if (domain != null) { if (timelineACLsManager.checkAccess(callerUGI, domain)) { return domain; } } return null; }
private TimelineDomain doGetDomain(String domainId, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain domain = store.getDomain(domainId); if (domain != null) { if (timelineACLsManager.checkAccess(callerUGI, domain)) { return domain; } } return null; }
private AccessControlListExt loadDomainFromTimelineStore( String domainId) throws IOException { if (store == null) { return null; } TimelineDomain domain = store.getDomain(domainId); if (domain == null) { return null; } else { return putDomainIntoCache(domain); } }
private AccessControlListExt loadDomainFromTimelineStore( String domainId) throws IOException { if (store == null) { return null; } TimelineDomain domain = store.getDomain(domainId); if (domain == null) { return null; } else { return putDomainIntoCache(domain); } }
/** * Get a single domain of the particular ID. If callerUGI is not the owner * or the admin of the domain, null will be returned. */ public TimelineDomain getDomain(String domainId, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain domain = store.getDomain(domainId); if (domain != null) { if (timelineACLsManager.checkAccess(callerUGI, domain)) { return domain; } } return null; }
@Override protected void serviceInit(Configuration conf) throws Exception { TimelineDomain domain = store.getDomain("DEFAULT"); // it is okay to reuse an existing domain even if it was created by another // user of the timeline server before, because it allows everybody to access. if (domain == null) { // create a default domain, which allows everybody to access and modify // the entities in it. domain = new TimelineDomain(); domain.setId(DEFAULT_DOMAIN_ID); domain.setDescription("System Default Domain"); domain.setOwner( UserGroupInformation.getCurrentUser().getShortUserName()); domain.setReaders("*"); domain.setWriters("*"); store.put(domain); } super.serviceInit(conf); }
@Override protected void serviceInit(Configuration conf) throws Exception { TimelineDomain domain = store.getDomain("DEFAULT"); // it is okay to reuse an existing domain even if it was created by another // user of the timeline server before, because it allows everybody to access. if (domain == null) { // create a default domain, which allows everybody to access and modify // the entities in it. domain = new TimelineDomain(); domain.setId(DEFAULT_DOMAIN_ID); domain.setDescription("System Default Domain"); domain.setOwner( UserGroupInformation.getCurrentUser().getShortUserName()); domain.setReaders("*"); domain.setWriters("*"); store.put(domain); } super.serviceInit(conf); }
@Override protected void serviceInit(Configuration conf) throws Exception { metrics = TimelineDataManagerMetrics.create(); TimelineDomain domain = store.getDomain("DEFAULT"); // it is okay to reuse an existing domain even if it was created by another // user of the timeline server before, because it allows everybody to access. if (domain == null) { // create a default domain, which allows everybody to access and modify // the entities in it. domain = new TimelineDomain(); domain.setId(DEFAULT_DOMAIN_ID); domain.setDescription("System Default Domain"); domain.setOwner( UserGroupInformation.getCurrentUser().getShortUserName()); domain.setReaders("*"); domain.setWriters("*"); store.put(domain); } super.serviceInit(conf); }
/** * Add or update an domain. If the domain already exists, only the owner * and the admin can update it. */ public void putDomain(TimelineDomain domain, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain existingDomain = store.getDomain(domain.getId()); if (existingDomain != null) { if (!timelineACLsManager.checkAccess(callerUGI, existingDomain)) { throw new YarnException(callerUGI.getShortUserName() + " is not allowed to override an existing domain " + existingDomain.getId()); } // Set it again in case ACLs are not enabled: The domain can be // modified by every body, but the owner is not changed. domain.setOwner(existingDomain.getOwner()); } store.put(domain); // If the domain exists already, it is likely to be in the cache. // We need to invalidate it. if (existingDomain != null) { timelineACLsManager.replaceIfExist(domain); } }
private void doPutDomain(TimelineDomain domain, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain existingDomain = store.getDomain(domain.getId()); if (existingDomain != null) { if (!timelineACLsManager.checkAccess(callerUGI, existingDomain)) { throw new YarnException(callerUGI.getShortUserName() + " is not allowed to override an existing domain " + existingDomain.getId()); } // Set it again in case ACLs are not enabled: The domain can be // modified by every body, but the owner is not changed. domain.setOwner(existingDomain.getOwner()); } store.put(domain); // If the domain exists already, it is likely to be in the cache. // We need to invalidate it. if (existingDomain != null) { timelineACLsManager.replaceIfExist(domain); } }
/** * Add or update an domain. If the domain already exists, only the owner * and the admin can update it. */ public void putDomain(TimelineDomain domain, UserGroupInformation callerUGI) throws YarnException, IOException { TimelineDomain existingDomain = store.getDomain(domain.getId()); if (existingDomain != null) { if (!timelineACLsManager.checkAccess(callerUGI, existingDomain)) { throw new YarnException(callerUGI.getShortUserName() + " is not allowed to override an existing domain " + existingDomain.getId()); } // Set it again in case ACLs are not enabled: The domain can be // modified by every body, but the owner is not changed. domain.setOwner(existingDomain.getOwner()); } store.put(domain); // If the domain exists already, it is likely to be in the cache. // We need to invalidate it. if (existingDomain != null) { timelineACLsManager.replaceIfExist(domain); } }
public void testGetDomain() throws IOException { TimelineDomain actualDomain1 = store.getDomain(domain1.getId()); verifyDomainInfo(domain1, actualDomain1); assertTrue(actualDomain1.getCreatedTime() > 0); assertTrue(actualDomain1.getModifiedTime() > 0); assertEquals( actualDomain1.getCreatedTime(), actualDomain1.getModifiedTime()); TimelineDomain actualDomain2 = store.getDomain(domain2.getId()); verifyDomainInfo(domain2, actualDomain2); assertEquals("domain_id_2", actualDomain2.getId()); assertTrue(actualDomain2.getCreatedTime() > 0); assertTrue(actualDomain2.getModifiedTime() > 0); assertTrue( actualDomain2.getCreatedTime() < actualDomain2.getModifiedTime()); }