Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <tmp-file-mgr.h>
Classes | |
class | File |
Static Public Member Functions | |
static Status | Init () |
static Status | GetFile (int tmp_device_id, const TUniqueId &query_id, File **new_file) |
static int | num_tmp_devices () |
Static Private Attributes | |
static bool | initialized_ |
static std::vector< std::string > | tmp_dirs_ |
The created tmp directories, atmost one per device. More... | |
TmpFileMgr is a utility class that creates temporary directories on the local filesystem. TmpFileMgr::GetFile() is used to return a TmpFileMgr::File handle with a unique filename on a specified temp file device - the client owns the handle.
Definition at line 28 of file tmp-file-mgr.h.
|
static |
Return a new File handle with a unique path for a query instance. The file path is within the (single) tmp directory on the specified device id. The caller owns the returned handle and is responsible for deleting it. The file is not created - creation is deferred until the first call to File::AllocateSpace().
Definition at line 88 of file tmp-file-mgr.cc.
References impala::OK, path(), and impala::PrintId().
Referenced by impala::BufferedBlockMgr::InitTmpFiles().
|
static |
Creates the tmp directories configured by CM. If multiple directories are specified per disk, only one is created and used. Must be called after DiskInfo::Init().
Definition at line 47 of file tmp-file-mgr.cc.
References impala::AVAILABLE_SPACE_THRESHOLD_MB, impala::Status::ok(), path(), RETURN_IF_ERROR, and impala::TMP_SUB_DIR_NAME.
Referenced by impala::ImpalaServer::ImpalaServer(), and main().
|
inlinestatic |
Total number of devices with tmp directories. This is the same as the number of tmp directories created.
Definition at line 87 of file tmp-file-mgr.h.
References tmp_dirs_.
Referenced by impala::BufferedBlockMgr::GetNumReservedBlocks(), and impala::BufferedBlockMgr::InitTmpFiles().
|
staticprivate |
Definition at line 90 of file tmp-file-mgr.h.
|
staticprivate |
The created tmp directories, atmost one per device.
Definition at line 93 of file tmp-file-mgr.h.
Referenced by num_tmp_devices().