util

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2021 License: Apache-2.0, BSD-3-Clause, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPidAlive

func CheckPidAlive(pid int) bool

CheckPidAlive check if the pid is running by checking /proc/xxx

func ExecuteYarnCMD

func ExecuteYarnCMD(cmds []string, user string) error

ExecuteYarnCMD execute yarn command The user parameter show who will execute the command

func ExecuteYarnUpdateNodeResource

func ExecuteYarnUpdateNodeResource(yarnBinPath, user, mems, cores string) error

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

func GetContainerProcessGroupId(cID string) int

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

func InitCgroup(user, group, envCgroupPath string) error

InitCgroup set cgroup related environment

func WaitTimeout

func WaitTimeout(wg *sync.WaitGroup, timeout time.Duration) bool

WaitTimeout waiting for waitgroup with the specified max timeout. Return true if waiting timed out.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL