[
https://issues.apache.org/jira/browse/STORM-3925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735337#comment-17735337
]
Bharat Gulati commented on STORM-3925:
--------------------------------------
Pull Request: https://github.com/apache/storm/pull/3547
> Allow user resources (in WorkerTopologyContext) to be set by Worker Hooks
> -------------------------------------------------------------------------
>
> Key: STORM-3925
> URL: https://issues.apache.org/jira/browse/STORM-3925
> Project: Apache Storm
> Issue Type: Improvement
> Components: storm-core
> Reporter: Bharat Gulati
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The current implementation of WorkerTopologyContext in WorkerState will
> always lead to empty userResources as no interface exposes a way to allow
> user to set them.
> {code:java}
> private Map<String, Object> makeUserResources() {
> /* TODO: need to invoke a hook provided by the topology, giving it a
> chance to create user resources.
> * this would be part of the initialization hook
> * need to separate workertopologycontext into WorkerContext and
> WorkerUserContext.
> * actually just do it via interfaces. just need to make sure to hide
> setResource from tasks
> */
> return new HashMap<>();
> } {code}
> The intention will be to expose the relevant methods under a separate class
> which can then allow users to set the resources from WorkerHooks while only
> providing get access from Tasks (i.e. via TopologyContext)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)