public static Map < String , Integer > getComponentsToScale ( Map < String , Integer > componentChanges , ScalingDirection scalingDirection ) { Map < String , Integer > componentsToScale = new HashMap < String , Integer > ( ) ; for ( String component : componentChanges . keySet ( ) ) { int parallelismChange = componentChanges . get ( component ) ; if ( scalingDirection . includes ( parallelismChange ) ) { componentsToScale . put ( component , parallelismChange ) ; } } return componentsToScale ; }
Identifies which components need to be scaled given specific scaling direction