[Enhancement](job) No need to query some backends which are not alive. (#28608)
No need to execute some jobs if backend is not alive
This commit is contained in:
@ -55,7 +55,8 @@ public class TabletStatMgr extends MasterDaemon {
|
||||
ImmutableMap<Long, Backend> backends = Env.getCurrentSystemInfo().getIdToBackend();
|
||||
long start = System.currentTimeMillis();
|
||||
taskPool.submit(() -> {
|
||||
backends.values().parallelStream().forEach(backend -> {
|
||||
// no need to get tablet stat if backend is not alive
|
||||
backends.values().stream().filter(Backend::isAlive).parallel().forEach(backend -> {
|
||||
BackendService.Client client = null;
|
||||
TNetworkAddress address = null;
|
||||
boolean ok = false;
|
||||
|
||||
@ -234,6 +234,9 @@ public class StreamLoadRecordMgr extends MasterDaemon {
|
||||
int pullRecordSize = 0;
|
||||
Map<Long, Long> beIdToLastStreamLoad = Maps.newHashMap();
|
||||
for (Backend backend : backends.values()) {
|
||||
if (!backend.isAlive()) {
|
||||
continue;
|
||||
}
|
||||
BackendService.Client client = null;
|
||||
TNetworkAddress address = null;
|
||||
boolean ok = false;
|
||||
|
||||
Reference in New Issue
Block a user