use of org.apache.tez.common.security.ACLConfigurationParser in project tez by apache.
the class ATSHistoryACLPolicyManager method createTimelineDomain.
private void createTimelineDomain(String domainId, Configuration tezConf, DAGAccessControls dagAccessControls) throws IOException, HistoryACLPolicyException {
TimelineDomain timelineDomain = new TimelineDomain();
timelineDomain.setId(domainId);
ACLConfigurationParser parser = new ACLConfigurationParser(tezConf, false);
timelineDomain.setReaders(getMergedViewACLs(parser, dagAccessControls));
timelineDomain.setWriters(user);
try {
if (timelineClient != null) {
timelineClient.putDomain(timelineDomain);
}
} catch (Exception e) {
LOG.warn("Could not post timeline domain", e);
throw new HistoryACLPolicyException("Fail to create ACL-related domain in Timeline", e);
}
}
use of org.apache.tez.common.security.ACLConfigurationParser in project tez by apache.
the class ATSV15HistoryACLPolicyManager method createTimelineDomain.
private void createTimelineDomain(ApplicationId applicationId, String domainId, Configuration tezConf, DAGAccessControls dagAccessControls) throws IOException, HistoryACLPolicyException {
TimelineDomain timelineDomain = new TimelineDomain();
timelineDomain.setId(domainId);
ACLConfigurationParser parser = new ACLConfigurationParser(tezConf, false);
timelineDomain.setReaders(getMergedViewACLs(parser, dagAccessControls));
timelineDomain.setWriters(user);
// Use dummy app attempt id
ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(applicationId, 1);
try {
if (timelineClient != null) {
timelineClient.putDomain(appAttemptId, timelineDomain);
}
} catch (Exception e) {
LOG.warn("Could not post timeline domain", e);
throw new HistoryACLPolicyException("Fail to create ACL-related domain in Timeline", e);
}
}
Aggregations