Example usage for org.apache.hadoop.yarn.conf YarnConfiguration LOG_AGGREGATION_ENABLED

List of usage examples for org.apache.hadoop.yarn.conf YarnConfiguration LOG_AGGREGATION_ENABLED

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.conf YarnConfiguration LOG_AGGREGATION_ENABLED.

Prototype

String LOG_AGGREGATION_ENABLED

To view the source code for org.apache.hadoop.yarn.conf YarnConfiguration LOG_AGGREGATION_ENABLED.

Click Source Link

Document

Whether to enable log aggregation

Usage

From source file:org.apache.tez.dag.app.dag.impl.TaskAttemptImpl.java

License:Apache License

protected void logJobHistoryAttemptStarted() {
    final String containerIdStr = containerId.toString();
    String inProgressLogsUrl = nodeHttpAddress + "/" + "node/containerlogs" + "/" + containerIdStr + "/"
            + this.appContext.getUser();
    String completedLogsUrl = "";
    if (conf.getBoolean(YarnConfiguration.LOG_AGGREGATION_ENABLED,
            YarnConfiguration.DEFAULT_LOG_AGGREGATION_ENABLED)
            && conf.get(YarnConfiguration.YARN_LOG_SERVER_URL) != null) {
        String contextStr = "v_" + getTask().getVertex().getName() + "_" + this.attemptId.toString();
        completedLogsUrl = conf.get(YarnConfiguration.YARN_LOG_SERVER_URL) + "/" + containerNodeId.toString()
                + "/" + containerIdStr + "/" + contextStr + "/" + this.appContext.getUser();
    }/*from  w ww. j av  a  2  s . c om*/
    TaskAttemptStartedEvent startEvt = new TaskAttemptStartedEvent(attemptId, getTask().getVertex().getName(),
            launchTime, containerId, containerNodeId, inProgressLogsUrl, completedLogsUrl, nodeHttpAddress);
    this.appContext.getHistoryHandler().handle(new DAGHistoryEvent(getDAGID(), startEvt));
}