yukuai518 commented on a change in pull request #2567: GOBBLIN-696: Provide an
"explain" option to return a compiled flow wh…
URL: https://github.com/apache/incubator-gobblin/pull/2567#discussion_r264977009
##########
File path:
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/spec_catalog/FlowCatalog.java
##########
@@ -250,16 +254,22 @@ public void put(Spec spec, boolean triggerListener) {
specStore.addSpec(spec);
metrics.updatePutSpecTime(startTime);
if (triggerListener) {
- this.listeners.onAddSpec(spec);
+ CallbacksDispatcher.CallbackResults<SpecCatalogListener<Object>,
Object> callbackResults = this.listeners.onAddSpec(spec);
+ for (Map.Entry<SpecCatalogListener<Object>, CallbackResult<Object>>
entry: callbackResults.getSuccesses().entrySet()) {
+ if
(entry.getKey().getName().equalsIgnoreCase(GOBBLIN_SERVICE_JOB_SCHEDULER)) {
Review comment:
I don't think it's a good idea to expose listener specific information here.
I would recommend to remove this GOBBLIN_SERVICE_JOB_SCHEDULER dependency and
return something like Map<String, AddSpecResponse> where key is the listener's
name and value is the return value after each listener calls onAddSpec(...)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services