Will-Lo commented on code in PR #3536:
URL: https://github.com/apache/gobblin/pull/3536#discussion_r948497350
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/GitMonitoringService.java:
##########
@@ -234,20 +219,22 @@ void processGitConfigChanges() throws GitAPIException,
IOException {
*/
void processGitConfigChangesHelper(List<DiffEntry> changes) throws
IOException {
for (DiffEntry change : changes) {
- switch (change.getChangeType()) {
- case ADD:
- case MODIFY:
- addChange(change);
- break;
- case DELETE:
- removeChange(change);
- break;
- case RENAME:
- removeChange(change);
- addChange(change);
- break;
- default:
- throw new RuntimeException("Unsupported change type " +
change.getChangeType());
+ for (GitDiffListener listener: this.listeners) {
+ switch (change.getChangeType()) {
+ case ADD:
Review Comment:
Each listener implements addChange() and removeChange(). The monitors would
register their own listeners. When a change is detected in this function, then
the listeners would apply the change to their underlying data structures such
as the flowGraph for the GitFlowGraphMonitor, or the FlowCatalog for the
GitConfigMonitor (but currently not active and disabled by default).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]