anuraagnalluri commented on a change in pull request #357:
URL: 
https://github.com/apache/incubator-yunikorn-core/pull/357#discussion_r795361831



##########
File path: pkg/webservice/handlers.go
##########
@@ -670,8 +670,11 @@ func getPartitionInfoDAO(lists 
map[string]*scheduler.PartitionContext) []*dao.Pa
                partitionInfo.LastStateTransitionTime = 
partitionContext.GetStateTime().String()
 
                capacityInfo := dao.PartitionCapacity{}
-               capacityInfo.Capacity = 
partitionContext.GetTotalPartitionResource().DAOString()
-               capacityInfo.UsedCapacity = 
partitionContext.GetAllocatedResource().DAOString()
+               capacity := partitionContext.GetTotalPartitionResource()

Review comment:
       I set the `DAOString()` to `capacityInfo.Capacity` on 675 below. On 677, 
I use this calculation to get the abs used capacity. If I don't store the 
calculation itself in its own variable, I either have to convert the string to 
`*resource.Resource` or recompute the capacity as an arg to 
`CalculateAbsUsedCapacity`.  




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to