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 8e1c206763 Allow controller to skip PinotFS setup test during boot
(#15358)
8e1c206763 is described below
commit 8e1c206763677c93f8d6604a3bd0f911242cc146
Author: Rekha Seethamraju <[email protected]>
AuthorDate: Mon Apr 21 23:41:59 2025 +0530
Allow controller to skip PinotFS setup test during boot (#15358)
---
.../apache/pinot/controller/ControllerConf.java | 7 ++++++
.../api/resources/ControllerFilePathProvider.java | 25 ++++++++++++++--------
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
index 0892564ed2..afb17232ca 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/ControllerConf.java
@@ -72,6 +72,9 @@ public class ControllerConf extends PinotConfiguration {
public static final String LEAD_CONTROLLER_RESOURCE_REBALANCE_STRATEGY =
"controller.resource.rebalance.strategy";
public static final String LEAD_CONTROLLER_RESOURCE_REBALANCE_DELAY_MS =
"controller.resource.rebalance.delay_ms";
+ //boolean Check if dataDir is avaiable on boot?
+ public static final String CONTINUE_WITHOUT_DEEP_STORE =
"controller.startup.continueWithoutDeepStore";
+
// Comma separated list of packages that contain TableConfigTuners to be
added to the registry
public static final String TABLE_CONFIG_TUNER_PACKAGES =
"controller.table.config.tuner.packages";
public static final String DEFAULT_TABLE_CONFIG_TUNER_PACKAGES =
"org.apache.pinot";
@@ -538,6 +541,10 @@ public class ControllerConf extends PinotConfiguration {
return getProperty(UPDATE_SEGMENT_STATE_MODEL, false);
}
+ public boolean isContinueWithoutDeepStore() {
+ return getProperty(CONTINUE_WITHOUT_DEEP_STORE, false);
+ }
+
public String generateVipUrl() {
return getControllerVipProtocol() + "://" + getControllerVipHost() + ":" +
getControllerVipPort();
}
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ControllerFilePathProvider.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ControllerFilePathProvider.java
index b9d38341b7..b405d43a3e 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ControllerFilePathProvider.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/ControllerFilePathProvider.java
@@ -63,16 +63,23 @@ public class ControllerFilePathProvider {
private ControllerFilePathProvider(ControllerConf controllerConf)
throws InvalidControllerConfigException {
String dataDir = controllerConf.getDataDir();
+ _dataDirURI = URIUtils.getUri(dataDir);
+ LOGGER.info("Initializing data directory: {}", _dataDirURI);
try {
- _dataDirURI = URIUtils.getUri(dataDir);
- LOGGER.info("Data directory: {}", _dataDirURI);
-
- PinotFS pinotFS = PinotFSFactory.create(_dataDirURI.getScheme());
- if (pinotFS.exists(_dataDirURI)) {
- Preconditions
- .checkState(pinotFS.isDirectory(_dataDirURI), "Data directory: %s
must be a directory", _dataDirURI);
- } else {
- Preconditions.checkState(pinotFS.mkdir(_dataDirURI), "Failed to create
data directory: %s", _dataDirURI);
+ try {
+ PinotFS pinotFS = PinotFSFactory.create(_dataDirURI.getScheme());
+ if (pinotFS.exists(_dataDirURI)) {
+ Preconditions.checkState(pinotFS.isDirectory(_dataDirURI), "Data
directory: %s must be a directory",
+ _dataDirURI);
+ } else {
+ Preconditions.checkState(pinotFS.mkdir(_dataDirURI), "Failed to
create data directory: %s", _dataDirURI);
+ }
+ } catch (Exception e) {
+ if (controllerConf.isContinueWithoutDeepStore()) {
+ LOGGER.error("Failed to access data directory: {}. Controller will
continue without deep store.", dataDir, e);
+ } else {
+ throw e;
+ }
}
String localTempDirPath = controllerConf.getLocalTempDir();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]