-
Notifications
You must be signed in to change notification settings - Fork 107
Specify non-random location for filesystem's temporary cache #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
23498bc
to
af3f71f
Compare
/// \param temp_dir Returns the path to the temporary directory. | ||
/// \return Error status | ||
Status MakeTemporaryDirectory( | ||
const FileSystemType type, std::string dir_path, std::string* temp_dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small thing, I think the dir_path
can be declared as const std::string& dir_path
here, and leave the LocalFileSystem::MakeTemporaryDirectory(std::string dir_path, ...)
as it is. Then, we can save a copy of dir_path
when passing the variable from the caller to MakeTemporaryDirectory()
here, and only copy it once when passing dir_path
from here to LocalFileSystem::MakeTemporaryDirectory()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll make sure to check and introduce this in a follow-up pr with the bug fix. Thanks for suggestion!
/// \param temp_dir Returns the path to the temporary directory. | ||
/// \return Error status | ||
Status MakeTemporaryDirectory( | ||
const FileSystemType type, std::string dir_path, std::string* temp_dir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const FileSystemType type, std::string dir_path, std::string* temp_dir); | |
const FileSystemType type, const std::string& dir_path, std::string* temp_dir); |
|
||
Status | ||
MakeTemporaryDirectory( | ||
const FileSystemType type, std::string dir_path, std::string* temp_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const FileSystemType type, std::string dir_path, std::string* temp_dir) | |
const FileSystemType type, const std::string& dir_path, std::string* temp_dir) |
* Add ability to specify directory for cloud storage
* Add ability to specify directory for cloud storage
Main ask for DLIS-5340
Previous PR: #254 needs some debugging.
This PR will only read env variable directory (if specified) and create temporary folder there.