(Executor executor, Integer taskId)
| 73 | private final boolean debug; |
| 74 | |
| 75 | public Task(Executor executor, Integer taskId) throws IOException { |
| 76 | this.taskId = taskId; |
| 77 | this.executor = executor; |
| 78 | this.workerData = executor.getWorkerData(); |
| 79 | this.topoConf = executor.getTopoConf(); |
| 80 | this.componentId = executor.getComponentId(); |
| 81 | this.streamComponentToGrouper = executor.getStreamToComponentToGrouper(); |
| 82 | this.streamToGroupers = getGroupersPerStream(streamComponentToGrouper); |
| 83 | this.executorStats = executor.getStats(); |
| 84 | this.workerTopologyContext = executor.getWorkerTopologyContext(); |
| 85 | this.emitSampler = ConfigUtils.mkStatsSampler(topoConf); |
| 86 | this.systemTopologyContext = mkTopologyContext(workerData.getSystemTopology()); |
| 87 | this.userTopologyContext = mkTopologyContext(workerData.getTopology()); |
| 88 | this.taskObject = mkTaskObject(); |
| 89 | this.debug = topoConf.containsKey(Config.TOPOLOGY_DEBUG) && (Boolean) topoConf.get(Config.TOPOLOGY_DEBUG); |
| 90 | this.addTaskHooks(); |
| 91 | this.taskMetrics = new TaskMetrics(this.workerTopologyContext, this.componentId, this.taskId, |
| 92 | workerData.getMetricRegistry(), topoConf); |
| 93 | } |
| 94 | |
| 95 | private static HashMap<String, ArrayList<LoadAwareCustomStreamGrouping>> getGroupersPerStream( |
| 96 | Map<String, Map<String, LoadAwareCustomStreamGrouping>> streamComponentToGrouper) { |
nothing calls this directly
no test coverage detected