Documentation ¶
Index ¶
- Constants
- func RegisterNMOperatorService(enableCadvisor bool, container *restful.Container)
- type NMOperator
- func (n *NMOperator) ForceUpdateCapacity(request *restful.Request, response *restful.Response)
- func (n *NMOperator) GetCapacity(request *restful.Request, response *restful.Response)
- func (n *NMOperator) GetContainers(request *restful.Request, response *restful.Response)
- func (n *NMOperator) GetContainersState(request *restful.Request, response *restful.Response)
- func (n *NMOperator) GetProperty(request *restful.Request, response *restful.Response)
- func (n *NMOperator) GetStatus(request *restful.Request, response *restful.Response)
- func (n *NMOperator) KillContainers(request *restful.Request, response *restful.Response)
- func (n *NMOperator) ScheduleDisable(request *restful.Request, response *restful.Response)
- func (n *NMOperator) ScheduleEnable(request *restful.Request, response *restful.Response)
- func (n *NMOperator) SetCapacity(request *restful.Request, response *restful.Response)
- func (n *NMOperator) SetProperty(request *restful.Request, response *restful.Response)
- func (n *NMOperator) StartNodeManager(request *restful.Request, response *restful.Response)
- func (n *NMOperator) StopNodeManager(request *restful.Request, response *restful.Response)
- func (n *NMOperator) UpdateCapacity(request *restful.Request, response *restful.Response)
Constants ¶
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