Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Fix Typos #644

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/scheduler/actions/reclaim/reclaim.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (alloc *reclaimAction) Execute(ssn *framework.Session) {

if task.Resreq.LessEqual(reclaimed) {
if err := ssn.Pipeline(task, n.Name); err != nil {
glog.Errorf("Failed to pipline Task <%s/%s> on Node <%s>",
glog.Errorf("Failed to pipeline Task <%s/%s> on Node <%s>",
task.Namespace, task.Name, n.Name)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/api/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func MergeErrors(errs ...error) error {
return nil
}

// JobTerminated checkes whether job was terminated.
// JobTerminated checks whether job was terminated.
func JobTerminated(job *JobInfo) bool {
return job.PodGroup == nil &&
job.PDB == nil &&
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/api/job_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ type JobInfo struct {
CreationTimestamp metav1.Time
PodGroup *v1alpha1.PodGroup

// TODO(k82cn): keep backward compatbility, removed it when v1alpha1 finalized.
// TODO(k82cn): keep backward compatibility, removed it when v1alpha1 finalized.
PDB *policyv1.PodDisruptionBudget
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/cache/event_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func (sc *SchedulerCache) setPodGroup(ss *kbv1.PodGroup) error {
job := getJobID(ss)

if len(job) == 0 {
return fmt.Errorf("the controller of PodGroup is empty")
return fmt.Errorf("the identity of PodGroup is empty")
}

if _, found := sc.Jobs[job]; !found {
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/plugins/drf/drf.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ func (drf *drfPlugin) OnSessionOpen(ssn *framework.Session) {
lv := l.(*api.JobInfo)
rv := r.(*api.JobInfo)

glog.V(4).Infof("DRF JobOrderFn: <%v/%v> is ready: %d, <%v/%v> is ready: %d",
lv.Namespace, lv.Name, lv.Priority, rv.Namespace, rv.Name, rv.Priority)
glog.V(4).Infof("DRF JobOrderFn: <%v/%v> share state: %d, <%v/%v> share state: %d",
lv.Namespace, lv.Name, drf.jobOpts[lv.UID].share, rv.Namespace, rv.Name, drf.jobOpts[rv.UID].share)

if drf.jobOpts[lv.UID].share == drf.jobOpts[rv.UID].share {
return 0
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/plugins/predicates/predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) {
nodeInfo.SetNode(node.Node)

if node.Allocatable.MaxTaskNum <= len(nodeInfo.Pods()) {
return fmt.Errorf("Node <%s> can not allow more task running on it.", node.Name)
return fmt.Errorf("node <%s> can not allow more task running on it", node.Name)
}

// NodeSeletor Predicate
// NodeSelector Predicate
fit, _, err := predicates.PodMatchNodeSelector(task.Pod, nil, nodeInfo)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/plugins/priority/priority.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (pp *priorityPlugin) OnSessionOpen(ssn *framework.Session) {
lv := l.(*api.TaskInfo)
rv := r.(*api.TaskInfo)

glog.V(4).Infof("Priority TaskOrder: <%v/%v> prority is %v, <%v/%v> priority is %v",
glog.V(4).Infof("Priority TaskOrder: <%v/%v> priority is %v, <%v/%v> priority is %v",
lv.Namespace, lv.Name, lv.Priority, rv.Namespace, rv.Name, rv.Priority)

if lv.Priority == rv.Priority {
Expand All @@ -59,7 +59,7 @@ func (pp *priorityPlugin) OnSessionOpen(ssn *framework.Session) {
lv := l.(*api.JobInfo)
rv := r.(*api.JobInfo)

glog.V(4).Infof("Priority JobOrderFn: <%v/%v> is ready: %d, <%v/%v> is ready: %d",
glog.V(4).Infof("Priority JobOrderFn: <%v/%v> priority: %d, <%v/%v> priority: %d",
lv.Namespace, lv.Name, lv.Priority, rv.Namespace, rv.Name, rv.Priority)

if lv.Priority > rv.Priority {
Expand Down
4 changes: 2 additions & 2 deletions pkg/scheduler/plugins/proportion/proportion.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func (pp *proportionPlugin) OnSessionOpen(ssn *framework.Session) {
}
allocated := allocations[job.Queue]
if allocated.Less(reclaimee.Resreq) {
glog.Errorf("Failed to calculate the allocation of Task <%s/%s> in Queue <%s>.",
glog.Errorf("Failed to allocate resource for Task <%s/%s> in Queue <%s>, not enough resource.",
reclaimee.Namespace, reclaimee.Name, job.Queue)
continue
}
Expand Down Expand Up @@ -226,7 +226,7 @@ func (pp *proportionPlugin) OnSessionClose(ssn *framework.Session) {
func (pp *proportionPlugin) updateShare(attr *queueAttr) {
res := float64(0)

// TODO(k82cn): how to handle fragement issues?
// TODO(k82cn): how to handle fragment issues?
for _, rn := range api.ResourceNames() {
share := helpers.Share(attr.allocated.Get(rn), attr.deserved.Get(rn))
if share > res {
Expand Down