[
https://issues.apache.org/jira/browse/GOBBLIN-1678?focusedWorklogId=805048&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-805048
]
ASF GitHub Bot logged work on GOBBLIN-1678:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/Aug/22 23:56
Start Date: 30/Aug/22 23:56
Worklog Time Spent: 10m
Work Description: arjun4084346 commented on code in PR #3536:
URL: https://github.com/apache/gobblin/pull/3536#discussion_r959025223
##########
gobblin-service/src/main/java/org/apache/gobblin/service/monitoring/GitFlowGraphMonitor.java:
##########
@@ -120,15 +119,19 @@ void processGitConfigChanges() throws GitAPIException,
IOException {
}
List<DiffEntry> changes = this.gitRepo.getChanges();
- Collections.sort(changes, (o1, o2) -> {
- Integer o1Depth = (o1.getNewPath() != null) ? (new
Path(o1.getNewPath())).depth() : (new Path(o1.getOldPath())).depth();
- Integer o2Depth = (o2.getNewPath() != null) ? (new
Path(o2.getNewPath())).depth() : (new Path(o2.getOldPath())).depth();
- return o1Depth.compareTo(o2Depth);
- });
+ Collections.sort(changes, new GitFlowgraphComparator());
processGitConfigChangesHelper(changes);
//Decrements the latch count. The countdown latch is initialized to 1. So
after the first time the latch is decremented,
// the following operation should be a no-op.
this.initComplete.countDown();
}
+ class GitFlowgraphComparator implements Comparator<DiffEntry> {
Review Comment:
It could be static
Issue Time Tracking
-------------------
Worklog Id: (was: 805048)
Time Spent: 3h (was: 2h 50m)
> Refactor GaaS Flowgraph Monitor to be extensible
> ------------------------------------------------
>
> Key: GOBBLIN-1678
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1678
> Project: Apache Gobblin
> Issue Type: Improvement
> Reporter: William Lo
> Priority: Major
> Time Spent: 3h
> Remaining Estimate: 0h
>
> To support new implementations of a flow graph monitor, which allows for live
> updating of a flowgraph, we should reuse as much implementation from the
> existing git flowgraph monitor as possible.
> The current flowgraph monitor has coupled logic to perform a lot of the
> adding node/edges which can be reused for a file based flowgraph.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)