[
https://issues.apache.org/jira/browse/TEZ-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084355#comment-14084355
]
Thaddeus Diamond commented on TEZ-1370:
---------------------------------------
Adding:
{noformat}
preWarmContext.setJavaOpts(TezConfiguration.TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT);
{noformat}
After setting the environment did not work. The launch options now match up
(as far as I could see when debugging the prewarm context and DAG submission).
For good measure I added:
{noformat}
tezConfiguration.setBoolean(TezConfiguration.TEZ_AM_CONTAINER_REUSE_NON_LOCAL_FALLBACK_ENABLED,
true);
{noformat}
On DAG submission but nothing.
Finally, I tried creating a new method:
{noformat}
private static String defaultLoggingArgsFor(String info) {
List<String> loggingArgs = list();
TezClientUtils.addLog4jSystemProperties(info, loggingArgs);
return Joiner.on(" ").join(loggingArgs);
}
{noformat}
And then updated the configuration setting:
{noformat}
preWarmContext.setJavaOpts(TezConfiguration.TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT + "
" + defaultLoggingArgsFor(TezConfiguration.TEZ_TASK_LOG_LEVEL_DEFAULT));
{noformat}
And it worked! This is extra yucky because the static {{TezClientUtils}}
method I used is annotated as {{@Private}}. I got the idea to try that method
because I saw what was going on inside {{TezClient#submitDAGSession()}}.
It still seems strange to me that this is required since I did not set either
of these variables when I created the {{Vertex}} in the DAG. m2c is that those
two lines shouldn't be needed and they should just be the default. Easy enough
to override after.
Okay, onto the next issue. Once it uses these prewarmed DAGs it actually takes
7s for the DAG to complete, whereas with a new container that was continually
reused it took 1s. What else should I prewarm to get that time down? Somehow
the classpath?
> Provide a configuration so when a session is started a set of containers are
> started with it
> --------------------------------------------------------------------------------------------
>
> Key: TEZ-1370
> URL: https://issues.apache.org/jira/browse/TEZ-1370
> Project: Apache Tez
> Issue Type: Wish
> Affects Versions: 0.5.0
> Environment: branch -> master
> hadoop -> HDP 2.1/CDH 5.0
> Reporter: Thaddeus Diamond
>
> This could use the existing
> {{TezConfiguration.TEZ_AM_SESSION_MIN_HELD_CONTAINERS}} configuration or a
> new one.
> The API would be as follows:
> {noformat}
> TezConfiguration tezConfiguration = new TezConfiguration(hadoopConfiguration);
> tezConfiguration.setBoolean(TEZ_AM_SESSION_MODE, true)
> tezConfiguration.setInt(TEZ_AM_SESSION_STARTUP_CONTAINERS, 3)
> TezClient tezClient = new TezClient("foobar", tezConfiguration);
> // The following should start 3 containers
> tezClient.start();
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.2#6252)