Skip to content

Commit

Permalink
Change RoutingTableProvider to support direct aggregating routing inf…
Browse files Browse the repository at this point in the history
…ormation from CurrentStates in each liveinstance. When sourceDataType is set as CurrentState, RoutingTableProvider will listen on CurrentStateChanges and refresh routing table from CurrentStates upon changes.

RB=1221442
G=helix-reviewers
A=jxue
  • Loading branch information
lei-xia authored and junkaixue committed Apr 11, 2022
1 parent 6b992c0 commit 04f466e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,9 @@ public ClusterEventProcessor(String clusterName, String processorName) {
public void queueEvent(ClusterEvent event) {
_eventQueue.put(event.getEventType(), event);
}

public void shutdown() {
_eventQueue.clear();
this.interrupt();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
import org.apache.helix.model.ExternalView;
import org.apache.helix.model.InstanceConfig;
import org.apache.helix.model.LiveInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* SourceClusterDataProvider listens to changes in 1 source cluster, notifies cluster data cache,
Expand All @@ -51,6 +53,8 @@
public class SourceClusterDataProvider extends BasicClusterDataCache
implements InstanceConfigChangeListener, LiveInstanceChangeListener,
ExternalViewChangeListener {
private static final Logger LOG = LoggerFactory.getLogger(SourceClusterDataProvider.class);

private final HelixManager _helixManager;
private final ClusterEventProcessor _eventProcessor;

Expand Down

0 comments on commit 04f466e

Please sign in to comment.