You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/04/13 22:50:43 UTC
[GitHub] [incubator-gobblin] jack-moseley opened a new pull request #2955:
[GOBBLIN-1115] Add flow level data movement authorization in gaas
jack-moseley opened a new pull request #2955: [GOBBLIN-1115] Add flow level data movement authorization in gaas
URL: https://github.com/apache/incubator-gobblin/pull/2955
Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
### JIRA
- [x] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
- https://issues.apache.org/jira/browse/GOBBLIN-1115
### Description
- [x] Here are some details about my PR, including screenshots (if applicable):
Create `DataMovementAuthorizer` which is called from compiler for each flow that is compiled to determine if it is authorized. By default it is just a `NoopDataMovementAuthorizer` that always returns true.
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
Tested with gaas
### Commits
- [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
2. Subject is limited to 50 characters
3. Subject does not end with a period
4. Subject uses the imperative mood ("add", not "adding")
5. Body wraps at 72 characters
6. Body explains "what" and "why", not "how"
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-gobblin] jack-moseley commented on issue #2955:
[GOBBLIN-1115] Add flow level data movement authorization in gaas
Posted by GitBox <gi...@apache.org>.
jack-moseley commented on issue #2955: [GOBBLIN-1115] Add flow level data movement authorization in gaas
URL: https://github.com/apache/incubator-gobblin/pull/2955#issuecomment-613794035
@sv2000 please review
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-gobblin] sv2000 commented on a change in pull request
#2955: [GOBBLIN-1115] Add flow level data movement authorization in gaas
Posted by GitBox <gi...@apache.org>.
sv2000 commented on a change in 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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-gobblin] codecov-io commented on issue #2955: [GOBBLIN-1115] Add flow level data movement authorization in gaas
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #2955:
URL: https://github.com/apache/incubator-gobblin/pull/2955#issuecomment-618110957
# [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=h1) Report
> Merging [#2955](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-gobblin/commit/c05b3cb7d7acd5540d5182718f52a7fcf4216503&el=desc) will **decrease** coverage by `0.92%`.
> The diff coverage is `72.00%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/graphs/tree.svg?width=650&height=150&src=pr&token=4MgURJ0bGc)](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #2955 +/- ##
============================================
- Coverage 45.62% 44.70% -0.93%
+ Complexity 9193 9026 -167
============================================
Files 1939 1940 +1
Lines 73531 73555 +24
Branches 8125 8127 +2
============================================
- Hits 33552 32885 -667
- Misses 36855 37588 +733
+ Partials 3124 3082 -42
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [.../org/apache/gobblin/service/ServiceConfigKeys.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vc2VydmljZS9TZXJ2aWNlQ29uZmlnS2V5cy5qYXZh) | `0.00% <ø> (ø)` | `0.00 <0.00> (ø)` | |
| [...org/apache/gobblin/metrics/ServiceMetricNames.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1tZXRyaWNzLWxpYnMvZ29iYmxpbi1tZXRyaWNzL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL21ldHJpY3MvU2VydmljZU1ldHJpY05hbWVzLmphdmE=) | `0.00% <ø> (ø)` | `0.00 <0.00> (ø)` | |
| [...ervice/modules/flow/BaseFlowToJobSpecCompiler.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9mbG93L0Jhc2VGbG93VG9Kb2JTcGVjQ29tcGlsZXIuamF2YQ==) | `65.51% <66.66%> (+0.04%)` | `13.00 <0.00> (ø)` | |
| [...lin/service/modules/flow/MultiHopFlowCompiler.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9mbG93L011bHRpSG9wRmxvd0NvbXBpbGVyLmphdmE=) | `71.94% <70.00%> (-0.79%)` | `17.00 <0.00> (+1.00)` | :arrow_down: |
| [...rvice/modules/flow/NoopDataMovementAuthorizer.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1zZXJ2aWNlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3NlcnZpY2UvbW9kdWxlcy9mbG93L05vb3BEYXRhTW92ZW1lbnRBdXRob3JpemVyLmphdmE=) | `100.00% <100.00%> (ø)` | `2.00 <2.00> (?)` | |
| [...gobblin/runtime/mapreduce/GobblinOutputFormat.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWFwcmVkdWNlL0dvYmJsaW5PdXRwdXRGb3JtYXQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-2.00%)` | |
| [...askStateCollectorServiceHiveRegHandlerFactory.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvVGFza1N0YXRlQ29sbGVjdG9yU2VydmljZUhpdmVSZWdIYW5kbGVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-2.00%)` | |
| [...re/filesystem/FsDatasetStateStoreEntryManager.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWV0YXN0b3JlL2ZpbGVzeXN0ZW0vRnNEYXRhc2V0U3RhdGVTdG9yZUVudHJ5TWFuYWdlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (-3.00%)` | |
| [...in/runtime/mapreduce/CustomizedProgresserBase.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1ydW50aW1lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9nb2JibGluL3J1bnRpbWUvbWFwcmVkdWNlL0N1c3RvbWl6ZWRQcm9ncmVzc2VyQmFzZS5qYXZh) | `0.00% <0.00%> (-83.34%)` | `0.00% <0.00%> (-1.00%)` | |
| [...rg/apache/gobblin/runtime/ZkDatasetStateStore.java](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree#diff-Z29iYmxpbi1tb2R1bGVzL2dvYmJsaW4taGVsaXgvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dvYmJsaW4vcnVudGltZS9aa0RhdGFzZXRTdGF0ZVN0b3JlLmphdmE=) | `0.00% <0.00%> (-80.77%)` | `0.00% <0.00%> (-7.00%)` | |
| ... and [46 more](https://codecov.io/gh/apache/incubator-gobblin/pull/2955/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=footer). Last update [c05b3cb...53e05a6](https://codecov.io/gh/apache/incubator-gobblin/pull/2955?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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:
users@infra.apache.org