[Improvement] heartbeat info improvement (#10699)
* heartbeat info improvement * import order
This commit is contained in:
parent
20970ad4ae
commit
3abca5fea0
|
|
@ -23,6 +23,7 @@ import org.apache.dolphinscheduler.api.utils.PageInfo;
|
|||
import org.apache.dolphinscheduler.api.utils.Result;
|
||||
import org.apache.dolphinscheduler.common.Constants;
|
||||
import org.apache.dolphinscheduler.common.enums.NodeType;
|
||||
import org.apache.dolphinscheduler.common.utils.HeartBeat;
|
||||
import org.apache.dolphinscheduler.dao.entity.ProcessInstance;
|
||||
import org.apache.dolphinscheduler.dao.entity.User;
|
||||
import org.apache.dolphinscheduler.dao.entity.WorkerGroup;
|
||||
|
|
@ -286,9 +287,9 @@ public class WorkerGroupServiceImpl extends BaseServiceImpl implements WorkerGro
|
|||
if (isPaging) {
|
||||
wg.setAddrList(String.join(Constants.COMMA, childrenNodes));
|
||||
String registeredValue = registryClient.get(workerGroupPath + Constants.SINGLE_SLASH + childrenNodes.iterator().next());
|
||||
String[] rv = registeredValue.split(Constants.COMMA);
|
||||
wg.setCreateTime(new Date(Long.parseLong(rv[6])));
|
||||
wg.setUpdateTime(new Date(Long.parseLong(rv[7])));
|
||||
HeartBeat heartBeat = HeartBeat.decodeHeartBeat(registeredValue);
|
||||
wg.setCreateTime(new Date(heartBeat.getStartupTime()));
|
||||
wg.setUpdateTime(new Date(heartBeat.getReportTime()));
|
||||
wg.setSystemDefault(true);
|
||||
}
|
||||
workerGroups.add(wg);
|
||||
|
|
|
|||
Loading…
Reference in New Issue