This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new c6a4800 Remove Inject annotation in StorageQuotaChecker (#8135)
c6a4800 is described below
commit c6a48004e9b83dfa69b2384343ff1837ba3b14fe
Author: Xiaotian (Jackie) Jiang <[email protected]>
AuthorDate: Fri Feb 4 17:17:50 2022 -0800
Remove Inject annotation in StorageQuotaChecker (#8135)
---
.../pinot/controller/validation/StorageQuotaChecker.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/validation/StorageQuotaChecker.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/validation/StorageQuotaChecker.java
index fab92ee..ee732b0 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/validation/StorageQuotaChecker.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/validation/StorageQuotaChecker.java
@@ -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);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]