hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2058) Coprocessors: CPU and memory limit policy enforcment via runtime weaving
Date Mon, 13 Dec 2010 21:08:06 GMT

    [ https://issues.apache.org/jira/browse/HBASE-2058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12971038#action_12971038

Andrew Purtell commented on HBASE-2058:

JANINO is an embeddable Java complier and claims to support static code analysis via a visitor
and code manipulation through allowing manipulation of the AST built during parse of source
file.  JANINO: http://docs.codehaus.org/display/JANINO/Home

For manipulating bytecode instead of Java source, the ASM framework can be used: http://asm.ow2.org/
. ASM can be used to modify existing classes or dynamically generate classes, directly in
binary form. 

JANINO may allow us to create private environments for loading and then unloading Java code.
Shame it seems to require compilation from Java source to do so. If all you have is bytecode,
then ASM is required. 

> Coprocessors: CPU and memory limit policy enforcment via runtime weaving
> ------------------------------------------------------------------------
>                 Key: HBASE-2058
>                 URL: https://issues.apache.org/jira/browse/HBASE-2058
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Andrew Purtell
> Use the ASM bytecode analysis and rewriting engine to impose some constraints on CPU
and memory use. This is middle ground between arbitrary function and a locked down language.
> We will be given arbitrary bytecode input. It is acceptable to reject a class and abort
coprocessor loading if it defies analysis at load time such that we have insufficient confidence
about the result.
> Wrap allocations to simply disallow large allocations. Hook or add finalizers to keep
a running tally of aggregate heap charge. Disallow allocation beyond policy limit.
> Weave CPU usage tracking into loop headers. Throw an uncatchable exception if time limits
prescribed by policy are exceeded.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message