nmoperator

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: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// EnvPidFile show nodemanager pid file
	EnvPidFile = "PID_FILE"
	// EnvCgroupPath show cgroup path
	EnvCgroupPath = "CGROUP_PATH"
	// EnvHadoopYarnHomd show nodemanager working path
	EnvHadoopYarnHomd = "HADOOP_YARN_HOME"
	// EnvUser show nodemanager working user in linux
	EnvUser = "USER"
	// EnvGroup show nodemanager working group in linux
	EnvGroup = "GROUP"
)

Variables

This section is empty.

Functions

func RegisterNMOperatorService

func RegisterNMOperatorService(enableCadvisor bool, container *restful.Container)

RegisterNMOperatorService register nodemanager operation service

Types

type NMOperator

type NMOperator struct {
	// contains filtered or unexported fields
}

NMOperator group options for nodemanager operation

func NewNMOperator

func NewNMOperator(enableCadvisor bool) *NMOperator

NewNMOperator return a new nodemanager operator instance

func (*NMOperator) ForceUpdateCapacity

func (n *NMOperator) ForceUpdateCapacity(request *restful.Request, response *restful.Response)

ForceUpdateCapacity update node capacity even when node is in schedule disabled state

func (*NMOperator) GetCapacity

func (n *NMOperator) GetCapacity(request *restful.Request, response *restful.Response)

GetCapacity get capacity

func (*NMOperator) GetContainers

func (n *NMOperator) GetContainers(request *restful.Request, response *restful.Response)

GetContainers return container list

func (*NMOperator) GetContainersState

func (n *NMOperator) GetContainersState(request *restful.Request, response *restful.Response)

GetContainersState get given container state list

func (*NMOperator) GetProperty

func (n *NMOperator) GetProperty(request *restful.Request, response *restful.Response)

GetProperty get property

func (*NMOperator) GetStatus

func (n *NMOperator) GetStatus(request *restful.Request, response *restful.Response)

GetStatus check if the nodemanager process is running, by checking pid file under /proc

func (*NMOperator) KillContainers

func (n *NMOperator) KillContainers(request *restful.Request, response *restful.Response)

KillContainers evict container list by kill process group id

func (*NMOperator) ScheduleDisable

func (n *NMOperator) ScheduleDisable(request *restful.Request, response *restful.Response)

ScheduleDisable disable nodemanager accepting new instances by setting resource capacity as zero

func (*NMOperator) ScheduleEnable

func (n *NMOperator) ScheduleEnable(request *restful.Request, response *restful.Response)

ScheduleEnable enable nodemanager accepting new instances by recovering resource capacity

func (*NMOperator) SetCapacity

func (n *NMOperator) SetCapacity(request *restful.Request, response *restful.Response)

SetCapacity set capacity

func (*NMOperator) SetProperty

func (n *NMOperator) SetProperty(request *restful.Request, response *restful.Response)

SetProperty set property

func (*NMOperator) StartNodeManager

func (n *NMOperator) StartNodeManager(request *restful.Request, response *restful.Response)

StartNodeManager start nodemanager

func (*NMOperator) StopNodeManager

func (n *NMOperator) StopNodeManager(request *restful.Request, response *restful.Response)

StopNodeManager stop nodemanager

func (*NMOperator) UpdateCapacity

func (n *NMOperator) UpdateCapacity(request *restful.Request, response *restful.Response)

UpdateCapacity update node capacity when node is in schedule enabled state

Jump to

Keyboard shortcuts

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