[ 
https://issues.apache.org/jira/browse/TEZ-2226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384108#comment-14384108
 ] 

Chang Li edited comment on TEZ-2226 at 3/27/15 4:39 PM:
--------------------------------------------------------

[~hitesh] Currently within createTimelineDomain, the failure of putDomain 
merely put out a warn message. It should've throw a TezUncheckedException so 
that both TezClient and ATSHistoryLoggingService can deal with the failure of 
correctly. Right now both TezClient and ATSHistoryLoggingService deal with the 
TezUncheckedException when trying to instantiate their ACLManager by
{code}
try {
      historyACLPolicyManager = ReflectionUtils.createClazzInstance(
          atsHistoryACLManagerClassName);
      historyACLPolicyManager.setConf(conf);
    } catch (TezUncheckedException e) {
      LOG.warn("Could not instantiate object for " + 
atsHistoryACLManagerClassName
          + ". ACLs cannot be enforced correctly for history data in Timeline", 
e);
      if 
(!conf.getBoolean(TezConfiguration.TEZ_AM_ALLOW_DISABLED_TIMELINE_DOMAINS,
          TezConfiguration.TEZ_AM_ALLOW_DISABLED_TIMELINE_DOMAINS_DEFAULT)) {
        throw e;
      }
      historyACLPolicyManager = null;
    }
{code}
Therefore, by integrating my changes, it should solve the problem of this jira. 


was (Author: lichangleo):
[~hitesh] Currently within createTimelineDomain, the failure of putDomain 
merely put out a warn message. It should've throw a TezUncheckedException so 
that both TezClient and ATSHistoryLoggingService can deal with the failure of 
correctly. Right now both TezClient and ATSHistoryLoggingService deal with the 
TezUncheckedException when trying to instantiate their ACLManager by
{code}
try {
      historyACLPolicyManager = ReflectionUtils.createClazzInstance(
          atsHistoryACLManagerClassName);
      historyACLPolicyManager.setConf(conf);
    } catch (TezUncheckedException e) {
      LOG.warn("Could not instantiate object for " + 
atsHistoryACLManagerClassName
          + ". ACLs cannot be enforced correctly for history data in Timeline", 
e);
      if 
(!conf.getBoolean(TezConfiguration.TEZ_AM_ALLOW_DISABLED_TIMELINE_DOMAINS,
          TezConfiguration.TEZ_AM_ALLOW_DISABLED_TIMELINE_DOMAINS_DEFAULT)) {
        throw e;
      }
      historyACLPolicyManager = null;
      timelineClient = null;
    }
{code}
Therefore, by integrating my changes, it should solve the problem of this jira. 

> Disable writing history to timeline if domain creation fails.
> -------------------------------------------------------------
>
>                 Key: TEZ-2226
>                 URL: https://issues.apache.org/jira/browse/TEZ-2226
>             Project: Apache Tez
>          Issue Type: Sub-task
>            Reporter: Hitesh Shah
>            Assignee: Chang Li
>            Priority: Blocker
>         Attachments: TEZ-2226.wip.2.patch, TEZ-2226.wip.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to