Documentation ¶
Index ¶
- func CheckPidAlive(pid int) bool
- func ExecuteYarnCMD(cmds []string, user string) error
- func ExecuteYarnUpdateNodeResource(yarnBinPath, user, mems, cores string) error
- func GetContainerProcessGroupId(cID string) int
- func GetContainersState(cids []string, cManager cadvisor.Cadvisor) global.NMContainersState
- func InitCgroup(user, group, envCgroupPath string) error
- func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPidAlive ¶
CheckPidAlive check if the pid is running by checking /proc/xxx
func ExecuteYarnCMD ¶
ExecuteYarnCMD execute yarn command The user parameter show who will execute the command
func ExecuteYarnUpdateNodeResource ¶
ExecuteYarnUpdateNodeResource execute update node resource The command description could be found from https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/YarnCommands.html You should also add the dynamic-resources.xml on the ResourceManager machines, in case the backup switching and the resource will be reset
func GetContainerProcessGroupId ¶
GetContainerProcessGroupId get process group id for the container
func GetContainersState ¶
func GetContainersState(cids []string, cManager cadvisor.Cadvisor) global.NMContainersState
GetContainersState return container info based on container ids given
func InitCgroup ¶
InitCgroup set cgroup related environment
Types ¶
This section is empty.