wilfred-s commented on a change in pull request #216:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/216#discussion_r567535397
##########
File path: pkg/scheduler/partition.go
##########
@@ -1208,3 +1210,17 @@ func (pc *PartitionContext) removeAllocationAsk(appID
string, allocationKey stri
}
}
}
+
+func (pc *PartitionContext) GetCurrentState() string {
+ return pc.stateMachine.Current()
+}
+
+func (pc *PartitionContext) GetStateTime() time.Time {
+ pc.RLock()
+ defer pc.RUnlock()
+ return pc.stateTime
+}
+
+func (pc *PartitionContext) GetNodeSortingPolicy() *policies.NodeSortingPolicy
{
+ return pc.nodeSortingPolicy
Review comment:
Can we change this to:
```
func (pc *PartitionContext) GetNodeSortingPolicy() String {
pc.RLock()
defer pc.RUnlock()
return pc.nodeSortingPolicy.PolicyType.String()
}
```
That is inline with the `getNodeIteratorForPolicy()` call.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]