Skip to content
Merged
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 @@ -2775,23 +2775,30 @@ public TGetTabletReplicaInfosResult getTabletReplicaInfos(TGetTabletReplicaInfos
LOG.warn("replica {} not normal", replica.getId());
continue;
}
Backend backend;
List<Backend> backends;
if (Config.isCloudMode()) {
CloudReplica cloudReplica = (CloudReplica) replica;
backend = cloudReplica.getPrimaryBackend(clusterId);
if (request.isSetWarmUpJobId()) {
CloudReplica cloudReplica = (CloudReplica) replica;
Backend primaryBackend = cloudReplica.getPrimaryBackend(clusterId);
backends = Lists.newArrayList(primaryBackend);
} else {
CloudReplica cloudReplica = (CloudReplica) replica;
backends = cloudReplica.getAllPrimaryBes();
}
} else {
backend = Env.getCurrentSystemInfo().getBackend(replica.getBackendIdWithoutException());
Backend backend = Env.getCurrentSystemInfo().getBackend(replica.getBackendIdWithoutException());
backends = Lists.newArrayList(backend);
}
if (backend != null) {
TReplicaInfo replicaInfo = new TReplicaInfo();
replicaInfo.setHost(backend.getHost());
replicaInfo.setBePort(backend.getBePort());
replicaInfo.setHttpPort(backend.getHttpPort());
replicaInfo.setBrpcPort(backend.getBrpcPort());
replicaInfo.setIsAlive(backend.isAlive());
replicaInfo.setBackendId(backend.getId());
replicaInfo.setReplicaId(replica.getId());
replicaInfos.add(replicaInfo);
for (Backend backend : backends) {
if (backend != null) {
TReplicaInfo replicaInfo = new TReplicaInfo();
replicaInfo.setHost(backend.getHost());
replicaInfo.setBePort(backend.getBePort());
replicaInfo.setHttpPort(backend.getHttpPort());
replicaInfo.setBrpcPort(backend.getBrpcPort());
replicaInfo.setReplicaId(replica.getId());
replicaInfos.add(replicaInfo);
}
}
}
tabletReplicaInfos.put(tabletId, replicaInfos);
Expand Down