[ https://issues.apache.org/jira/browse/GOBBLIN-1115?focusedWorklogId=422525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-422525 ]
ASF GitHub Bot logged work on GOBBLIN-1115: ------------------------------------------- Author: ASF GitHub Bot Created on: 15/Apr/20 05:55 Start Date: 15/Apr/20 05:55 Worklog Time Spent: 10m Work Description: sv2000 commented on pull request #2955: [GOBBLIN-1115] Add flow level data movement authorization in gaas URL: https://github.com/apache/incubator-gobblin/pull/2955#discussion_r408596175 ########## File path: gobblin-service/src/main/java/org/apache/gobblin/service/modules/flow/MultiHopFlowCompiler.java ########## @@ -169,15 +186,26 @@ public void awaitHealthy() throws InterruptedException { FlowSpec flowSpec = (FlowSpec) spec; String source = ConfigUtils.getString(flowSpec.getConfig(), ServiceConfigKeys.FLOW_SOURCE_IDENTIFIER_KEY, ""); - String destination = - ConfigUtils.getString(flowSpec.getConfig(), ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY, ""); + String destination = ConfigUtils.getString(flowSpec.getConfig(), ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY, ""); + + DataNode sourceNode = this.flowGraph.getNode(source); + List<String> destNodeIds = ConfigUtils.getStringList(flowSpec.getConfig(), ServiceConfigKeys.FLOW_DESTINATION_IDENTIFIER_KEY); + List<DataNode> destNodes = destNodeIds.stream().map(this.flowGraph::getNode).collect(Collectors.toList()); + log.info(String.format("Compiling flow for source: %s and destination: %s", source, destination)); List<FlowSpec> flowSpecs = splitFlowSpec(flowSpec); Dag<JobExecutionPlan> jobExecutionPlanDag = new Dag<>(new ArrayList<>()); try { this.rwLock.readLock().lock(); for (FlowSpec datasetFlowSpec : flowSpecs) { + for (DataNode destNode : destNodes) { + if (!this.dataMovementAuthorizer.isMovementAuthorized(flowSpec, sourceNode, destNode)) { + log.error("Data movement is not authorized"); Review comment: Add source/dest nodes and FlowConfig in the log message. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 422525) Time Spent: 0.5h (was: 20m) > Add flow level data movement authorization in gaas > -------------------------------------------------- > > Key: GOBBLIN-1115 > URL: https://issues.apache.org/jira/browse/GOBBLIN-1115 > Project: Apache Gobblin > Issue Type: Improvement > Reporter: Jack Moseley > Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)