Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <filesystem-util.h>
Static Public Member Functions | |
static Status | CreateDirectories (const std::vector< std::string > &directories) |
static Status | CreateFile (const std::string &file_path) |
Create a file at the specified path. More... | |
static Status | ResizeFile (const std::string &file_path, int64_t trunc_len) |
Resize a file to a specified length - uses unistd truncate(). More... | |
static Status | RemovePaths (const std::vector< std::string > &directories) |
Remove the specified paths and their enclosing files/directories. More... | |
static Status | VerifyIsDirectory (const std::string &directory_path) |
static Status | GetSpaceAvailable (const std::string &directory_path, uint64_t *available_bytes) |
Utility class for common local file system operations such as file creation and deletion. This class should NOT be used to read or write data (DiskIoMgr is used for that). Errors are indicated by the status code RUNTIME_ERROR, and are not handled via exceptions.
Definition at line 26 of file filesystem-util.h.
|
static |
Create the specified directories. The directories and their contents are destroyed if they already exist.
Definition at line 33 of file filesystem-util.cc.
References impala::OK.
|
static |
Create a file at the specified path.
Definition at line 66 of file filesystem-util.cc.
References impala::GetStrErrMsg(), and impala::OK.
Referenced by impala::TmpFileMgr::File::AllocateSpace().
|
static |
Returns the space available on the file system containing 'directory_path' in 'available_bytes'
Definition at line 114 of file filesystem-util.cc.
References impala::OK, and impala::space.
|
static |
Remove the specified paths and their enclosing files/directories.
Definition at line 53 of file filesystem-util.cc.
References impala::OK.
Referenced by impala::TmpFileMgr::File::Remove().
|
static |
Resize a file to a specified length - uses unistd truncate().
Definition at line 85 of file filesystem-util.cc.
References impala::GetStrErrMsg(), and impala::OK.
Referenced by impala::TmpFileMgr::File::AllocateSpace().
|
static |
Verify that the specified path is an existing directory. Returns Status::OK if it is, or a runtime error with a message otherwise.
Definition at line 96 of file filesystem-util.cc.
References impala::OK.