Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,15 @@ private void getForecastRequestStats(String jobId, String forecastId, ActionList
} else if (forecastRequestStats.getStatus() == ForecastRequestStats.ForecastRequestStatus.FAILED) {
List<String> messages = forecastRequestStats.getMessages();
if (messages.size() > 0) {
String message = messages.get(0);

// special case: if forecast failed due to insufficient disk space, log the setting
if (message.contains("disk space is insufficient")) {
message += " Minimum disk space required: [" + processManager.getMinLocalStorageAvailable() + "]";
}

listener.onFailure(ExceptionsHelper.badRequestException("Cannot run forecast: "
+ messages.get(0)));
+ message));
} else {
// paranoia case, it should not be possible to have an empty message list
listener.onFailure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,10 @@ ExecutorService createAutodetectExecutorService(ExecutorService executorService)
return autoDetectWorkerExecutor;
}

public ByteSizeValue getMinLocalStorageAvailable() {
return nativeStorageProvider.getMinLocalStorageAvailable();
}

/*
* The autodetect native process can only handle a single operation at a time. In order to guarantee that, all
* operations are initially added to a queue and a worker thread from ml autodetect threadpool will process each
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public void cleanupLocalTmpStorage(Path path) throws IOException {
}
}

public ByteSizeValue getMinLocalStorageAvailable() {
return minLocalStorageAvailable;
}

long getUsableSpace(Path path) throws IOException {
long freeSpaceInBytes = Environment.getFileStore(path).getUsableSpace();

Expand Down