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

Chris Riccomini commented on SAMZA-109:
---------------------------------------

bq. Ok. Will remove the first point.

Cool, thanks.

bq. BTW, what is the format of using the task.opts? I do not see any documents 
mentioning it. Want to add an example into the table.

It would be good to have an example, if one isn't shown in the config table. 
Anything you put in task.opts gets forwarded directly to the commandline as 
part of the JVM invocation. So, the format is usually a bunch of JVM switches. 
Things like:

{noformat}
task.opts=-Xmx2048 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseConcMarkSweepGC
{noformat}

Note that you can't use bash $FOO environment variables inside. They're escaped 
for security.

> Make task.opts easier to use
> ----------------------------
>
>                 Key: SAMZA-109
>                 URL: https://issues.apache.org/jira/browse/SAMZA-109
>             Project: Samza
>          Issue Type: Bug
>          Components: container
>    Affects Versions: 0.6.0
>            Reporter: Chris Riccomini
>            Assignee: Chinmay Soman
>             Fix For: 0.8.0
>
>         Attachments: samza_109_1.patch, samza_109_1_1.patch, 
> samza_109_1_2.patch
>
>
> task.opts is a bit tricky to use right now.
> The most common thing that I see people want to do are:
> * Change the Xmx setting for their Samza containers.
> * Turn on a remote debugger.
> * Change garbage collector settings.
> Most of the time they do this in dev-mode (using LocalJobFactory).
> Changing task.opts is tricky for a number of reasons.
> 1. Changing task.opts at all eliminates all of the defaults. This means, if 
> you set -Xmx, you lose all the defaults set in run-class.sh when no JVM_OPTS 
> is set (log settings, Java system properties, etc).
> 2. LocalJobFactory uses ThreadJob by default, which doesn't even pay 
> attention to task.opts (since it starts the container as a thread, not a new 
> process).
> 3. If you manage to figure out how to switch LocalJobFactory to use 
> ProcessJob (undocumented), you end up with the SamzaContainer running as a 
> separate process with no way to kill it (the LocalJobRunner starts the 
> ProcessJob, then exits).



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

Reply via email to