@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
17
- package prioritize
17
+ package nodeorder
18
18
19
19
import (
20
20
"fmt"
@@ -32,7 +32,7 @@ import (
32
32
"github.com/kubernetes-sigs/kube-batch/pkg/scheduler/framework"
33
33
)
34
34
35
- type prioritizePlugin struct {
35
+ type nodeOrderPlugin struct {
36
36
}
37
37
38
38
func getInterPodAffinityScore (name string , interPodAffinityScore schedulerapi.HostPriorityList ) int {
@@ -146,15 +146,15 @@ func (nl *nodeLister) List() ([]*v1.Node, error) {
146
146
147
147
//New function returns prioritizePlugin object
148
148
func New () framework.Plugin {
149
- return & prioritizePlugin {}
149
+ return & nodeOrderPlugin {}
150
150
}
151
151
152
- func (pp * prioritizePlugin ) Name () string {
153
- return "prioritize "
152
+ func (pp * nodeOrderPlugin ) Name () string {
153
+ return "nodeorder "
154
154
}
155
155
156
- func (pp * prioritizePlugin ) OnSessionOpen (ssn * framework.Session ) {
157
- priorityFn := func (task * api.TaskInfo , node * api.NodeInfo ) (int , error ) {
156
+ func (pp * nodeOrderPlugin ) OnSessionOpen (ssn * framework.Session ) {
157
+ nodeOrderFn := func (task * api.TaskInfo , node * api.NodeInfo ) (int , error ) {
158
158
159
159
pl := & podLister {
160
160
session : ssn ,
@@ -207,8 +207,8 @@ func (pp *prioritizePlugin) OnSessionOpen(ssn *framework.Session) {
207
207
glog .V (4 ).Infof ("Total Score for that node is: %d" , score )
208
208
return score , nil
209
209
}
210
- ssn .AddPriorityFn (pp .Name (), priorityFn )
210
+ ssn .AddNodeOrderFn (pp .Name (), nodeOrderFn )
211
211
}
212
212
213
- func (pp * prioritizePlugin ) OnSessionClose (ssn * framework.Session ) {
213
+ func (pp * nodeOrderPlugin ) OnSessionClose (ssn * framework.Session ) {
214
214
}
0 commit comments