故事是这样的,突然一个非小白用户爆出来说presto页面上active的worker数量为0。看了一眼机器状态,都获得好好的,并没有啥错误日志。于是开始了一次定位之旅。
获取集群状态
先获取集群状态看看,确认下眼没有瞎。接口:
http://xxx/v1/cluster
返回:
"runningQueries":0,"blockedQueries":0,"queuedQueries":0,"activeCoordinators":1,"activeWorkers":0,"runningDrivers":0,"totalAvailableProcessors":0,"reservedMemory":0.0,"totalInputRows":268931841,"totalInputBytes":37945815115,"totalCpuTimeSecs":713}
注意到这里active 的worker数量为0。
获取node信息:
是node挂了么?来,找个接口看看node的状态。
接口:
http://xxx