Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,16 @@ private List<Map<String, Collection<String>>> functionAssignmentsDecode(String j
return retVal;
}

private String getTopicStats(String name) throws Exception {
ContainerExecResult result = pulsarCluster.getProxy().execCmd(
PulsarCluster.ADMIN_SCRIPT,
"topics",
"stats",
name
);
return result.getStdout();
}

private List<WorkerInfo> getClusterStatus() throws Exception {
val result = pulsarCluster.getAnyWorker().execCmd(
PulsarCluster.ADMIN_SCRIPT,
Expand Down Expand Up @@ -311,6 +321,7 @@ private void testRebalance() throws Exception {

WorkerInfo oldClusterLeaderInfo = getClusterLeader();
log.info("Cluster leader before adding more workers is: {}", oldClusterLeaderInfo);
log.debug("Stats for the Coordinate Topic: \n{}", getTopicStats("persistent://public/functions/coordinate"));

List<Map<String, Collection<String>>> startFinfos = getFunctionAssignments();
int startFuncCount = getFuncAssignmentsCount(startFinfos);
Expand All @@ -334,6 +345,7 @@ private void testRebalance() throws Exception {

WorkerInfo newClusterLeaderInfo = getClusterLeader();
log.info("Cluster leader after adding {} workers is: {}", numWorkersToAdd, newClusterLeaderInfo);
log.debug("Stats for the Coordinate Topic: \n{}", getTopicStats("persistent://public/functions/coordinate"));
// Leadership should not have changed.
assertTrue(oldClusterLeaderInfo.getWorkerId().compareTo(newClusterLeaderInfo.getWorkerId()) == 0);

Expand Down
Loading