diff --git a/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py b/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py index 08cf4b231..2f7e9147e 100644 --- a/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py +++ b/user_tools/src/spark_rapids_pytools/cloud_api/onprem.py @@ -312,8 +312,10 @@ def _get_cost_per_cluster(self, cluster: ClusterGetAccessor): if self.price_provider.name.casefold() == 'dataproc': master_cost = self.__calculate_dataproc_group_cost(cluster, SparkNodeType.MASTER) workers_cost = self.__calculate_dataproc_group_cost(cluster, SparkNodeType.WORKER) - master_cores = cluster.get_nodes_cnt(SparkNodeType.MASTER) * cluster.get_node_core_count(SparkNodeType.MASTER) - worker_cores = cluster.get_nodes_cnt(SparkNodeType.WORKER) * cluster.get_node_core_count(SparkNodeType.WORKER) + master_cores = cluster.get_nodes_cnt(SparkNodeType.MASTER) * \ + cluster.get_node_core_count(SparkNodeType.MASTER) + worker_cores = cluster.get_nodes_cnt(SparkNodeType.WORKER) * \ + cluster.get_node_core_count(SparkNodeType.WORKER) dataproc_cost = self.price_provider.get_container_cost() * (master_cores + worker_cores) total_cost = master_cost + workers_cost + dataproc_cost return total_cost