[ https://issues.apache.org/jira/browse/STORM-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15397622#comment-15397622 ]
ASF GitHub Bot commented on STORM-1277: --------------------------------------- Github user HeartSaVioR commented on a diff in the pull request: https://github.com/apache/storm/pull/1445#discussion_r72634682 --- Diff: storm-core/src/jvm/org/apache/storm/daemon/StormCommon.java --- @@ -539,10 +557,35 @@ protected IAuthorizer mkAuthorizationHandlerImpl(String klassName, Map conf) thr if (aznHandler != null) { aznHandler.prepare(conf); } - LOG.debug("authorization class name:{}, class:{}, handler:{}",klassName, aznClass, aznHandler); + LOG.debug("authorization class name:{}, class:{}, handler:{}", klassName, aznClass, aznHandler); } } return aznHandler; } + + @SuppressWarnings("unchecked") + public static WorkerTopologyContext makeWorkerContext(Map<String, Object> workerData) { + try { + StormTopology stormTopology = (StormTopology) workerData.get(Constants.SYSTEM_TOPOLOGY); + Map stormConf = (Map) workerData.get(Constants.STORM_CONF); + Map<Integer, String> taskToComponent = (Map<Integer, String>) workerData.get(Constants.TASK_TO_COMPONENT); + Map<String, List<Integer>> componentToSortedTasks = + (Map<String, List<Integer>>) workerData.get(Constants.COMPONENT_TO_SOTRTED_TASKS); + Map<String, Map<String, Fields>> componentToStreamToFields = + (Map<String, Map<String, Fields>>) workerData.get(Constants.COMPONENT_TO_STREAM_TO_FIELDS); + String stormId = (String) workerData.get(Constants.STORM_ID); + Map conf = (Map) workerData.get(Constants.CONF); + Integer port = (Integer) workerData.get(Constants.PORT); + String codeDir = ConfigUtils.supervisorStormResourcesPath(ConfigUtils.supervisorStormDistRoot(conf, stormId)); + String pidDir = ConfigUtils.workerPidsRoot(conf, stormId); + List<Integer> workerTasks = (List<Integer>) workerData.get(Constants.TASK_IDS); + Map<String, Object> defaultResources = (Map<String, Object>) workerData.get(Constants.DEFAULT_SHARED_RESOURCES); + Map<String, Object> userResources = (Map<String, Object>) workerData.get(Constants.USER_SHARED_RESOURCES); + return new WorkerTopologyContext(stormTopology, stormConf, taskToComponent, componentToSortedTasks, + componentToStreamToFields, stormId, codeDir, pidDir, port, workerTasks, defaultResources, userResources); + } catch (IOException e) { + throw Utils.wrapInRuntime(e); --- End diff -- Just a curious, where is the place which throws IOException? At a glance I don't find a reason to throw in this code path, so I'd like to see the details. > port backtype.storm.daemon.executor to java > ------------------------------------------- > > Key: STORM-1277 > URL: https://issues.apache.org/jira/browse/STORM-1277 > Project: Apache Storm > Issue Type: New Feature > Components: storm-core > Reporter: Robert Joseph Evans > Assignee: Cody > Labels: java-migration, jstorm-merger > > https://github.com/apache/storm/tree/jstorm-import/jstorm-core/src/main/java/com/alibaba/jstorm/task > kind of. Tasks and executors are combined in jstorm. -- This message was sent by Atlassian JIRA (v6.3.4#6332)