accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-1652) Provide hooks to customize OnOutOfMemoryError behavior
Date Tue, 13 Aug 2013 17:23:48 GMT

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

Michael Wall commented on ACCUMULO-1652:
----------------------------------------

Thinking about keeping the git diff clean, it might be nice to be able to customize the name
of the script.  Default to oom.sh, but give the admin the flexibility to change that without
having to change committed files.

Maybe more complex, but here is what I was thinking.

Modify accumulo-env.sh and add
{noformat}
ACCUMULO_OOM_SCRIPT="${ACCUMULO_HOME}/bin/oom.sh"
{noformat}

Also add the following toward the end of accumulo-env.sh at the end.  This would allow overriding
variables.
{noformat}
if [ -e "${ACCUMULO_CONF_DIR}/accumulo-env-local.sh" ]; then
  source ${ACCUMULO_CONF_DIR}/accumulo-env-local.sh
fi
{noformat}

Gitignore the accumulo-env-local.sh

Create bin/oom.sh with 
{noformat}
kill -9 $1
{noformat}

Modify bin/accumulo similiar to what Drew suggests with 
{noformat}
-XX:OnOutOfMemoryError="${ACCUMULO_OOM_SCRIPT} %p"
{noformat}

Then, if a user wants to use different file, they create a conf/accumulo-env-local.sh with
{noformat}
ACCUMULO_OOM_SCRIPT="/path/to/new/oom.sh"
{noformat}

and then that script also gets passed the pid.  This setup would also allow overriding of
other variables if needed.

                
> Provide hooks to customize OnOutOfMemoryError behavior
> ------------------------------------------------------
>
>                 Key: ACCUMULO-1652
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1652
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 1.4.3, 1.5.0
>            Reporter: Drew Farris
>            Priority: Minor
>
> Currently, the accumulo startup script hardcodes {{OnOutOfMemoryError}} behavior to be
{{kill -9 %p}}. Perhaps this could be modified to call a script.
> for example: {noformat}-XX:OnOutOfMemoryError="${ACCUMULO_HOME}/bin/oom.sh %p $1"{noformat}
whose default behavior implementation is {{kill -9}}, but this can be modified by the administrator
to implement other behavior (e.g. do a {{jstack}} first).
> This has the added benefit of being able to modify the behavior at runtime without restarting
processes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message