Xiao-zhen-Liu commented on code in PR #3550:
URL: https://github.com/apache/texera/pull/3550#discussion_r2289621102
##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala:
##########
@@ -73,14 +85,21 @@ class DefaultCostEstimator(
case Some(_) =>
}
- override def estimate(region: Region, resourceUnits: Int): Double = {
- this.operatorEstimatedTimeOption match {
+ override def allocateResourcesAndEstimateCost(
+ region: Region,
+ resourceUnits: Int
+ ): (Region, Double) = {
+ // Currently the dummy cost from resourceAllocator is discarded.
+ val (newRegion, _) = resourceAllocator.allocate(region)
Review Comment:
We can keep only resource allocator in the future if it can both allocate
resources and estimate costs. For now we are doing this refactoring so that the
two are not separated (to align with the diagram).
##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostEstimator.scala:
##########
@@ -73,14 +85,21 @@ class DefaultCostEstimator(
case Some(_) =>
}
- override def estimate(region: Region, resourceUnits: Int): Double = {
- this.operatorEstimatedTimeOption match {
+ override def allocateResourcesAndEstimateCost(
+ region: Region,
+ resourceUnits: Int
+ ): (Region, Double) = {
+ // Currently the dummy cost from resourceAllocator is discarded.
+ val (newRegion, _) = resourceAllocator.allocate(region)
+ // We use a cost model that does not rely on the resource allocation.
+ // TODO: Once the ResourceAllocator actually calculates a cost, we can use
its calculated cost.
Review Comment:
Ditto
--
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]