[ https://issues.apache.org/jira/browse/STORM-3925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Richard Zowalla closed STORM-3925. ---------------------------------- > 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: 1.5h > 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)