Remove Inject annotation in StorageQuotaChecker
@@ -20,7 +20,6 @@ package org.apache.pinot.controller.validation;
import com.google.common.base.Preconditions;
import java.util.Set;
-import javax.inject.Inject;
import org.apache.pinot.common.exception.InvalidConfigException;
import org.apache.pinot.common.metrics.ControllerGauge;
import org.apache.pinot.common.metrics.ControllerMetrics;
@@ -33,6 +32,7 @@ import org.apache.pinot.spi.utils.DataSizeUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
/**
* Class to check if a new segment is within the configured storage quota for the table
*
@@ -40,13 +40,11 @@ import org.slf4j.LoggerFactory;
public class StorageQuotaChecker {
private static final Logger LOGGER = LoggerFactory.getLogger(StorageQuotaChecker.class);
- @Inject
- PinotHelixResourceManager _pinotHelixResourceManager;
-
private final TableSizeReader _tableSizeReader;
private final TableConfig _tableConfig;
private final ControllerMetrics _controllerMetrics;
private final boolean _isLeaderForTable;
+ private final PinotHelixResourceManager _pinotHelixResourceManager;
public StorageQuotaChecker(TableConfig tableConfig, TableSizeReader tableSizeReader,
ControllerMetrics controllerMetrics, boolean isLeaderForTable,
@@ -129,10 +127,9 @@ public class StorageQuotaChecker {
if (tableSubtypeSize._missingSegments > 0) {
if (tableSubtypeSize._estimatedSizeInBytes > allowedStorageBytes) {
- return failure(
- "Table " + tableNameWithType + " already over quota. Estimated size for all replicas is " + DataSizeUtils
- .fromBytes(tableSubtypeSize._estimatedSizeInBytes) + ". Configured size for " + numReplicas + " is "
- + DataSizeUtils.fromBytes(allowedStorageBytes));
+ return failure("Table " + tableNameWithType + " already over quota. Estimated size for all replicas is "
+ + DataSizeUtils.fromBytes(tableSubtypeSize._estimatedSizeInBytes) + ". Configured size for " + numReplicas
+ + " is " + DataSizeUtils.fromBytes(allowedStorageBytes));
} else {
return success("Missing size report for " + tableSubtypeSize._missingSegments
+ " segments. Bypassing storage quota check for " + tableNameWithType);
