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 2a36d4c Add error message if unable to create index / tmp resource
dir (#8076)
2a36d4c is described below
commit 2a36d4cb7ac2265828fd0f9ab4045ea44cbc44f1
Author: Mark Needham <[email protected]>
AuthorDate: Mon Jan 31 18:55:26 2022 +0000
Add error message if unable to create index / tmp resource dir (#8076)
---
.../org/apache/pinot/core/data/manager/BaseTableDataManager.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
index 02aab34..0b33a87 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java
@@ -106,14 +106,18 @@ public abstract class BaseTableDataManager implements
TableDataManager {
_tableDataDir = tableDataManagerConfig.getDataDir();
_indexDir = new File(_tableDataDir);
if (!_indexDir.exists()) {
- Preconditions.checkState(_indexDir.mkdirs());
+ Preconditions.checkState(_indexDir.mkdirs(),
+ "Unable to create index directory at %s. Check that the user has
permissions on this directory.",
+ _indexDir);
}
_resourceTmpDir = new File(_indexDir, "tmp");
// This is meant to cleanup temp resources from TableDataManager. But
other code using this same
// directory will have those deleted as well.
FileUtils.deleteQuietly(_resourceTmpDir);
if (!_resourceTmpDir.exists()) {
- Preconditions.checkState(_resourceTmpDir.mkdirs());
+ Preconditions.checkState(_resourceTmpDir.mkdirs(),
+ "Unable to create temp resources directory at %s. Check that the
user has permissions on this directory.",
+ _resourceTmpDir);
}
_errorCache = errorCache;
_logger = LoggerFactory.getLogger(_tableNameWithType + "-" +
getClass().getSimpleName());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]