Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <disk-info.h>
Classes | |
struct | Disk |
Static Public Member Functions | |
static void | Init () |
Initialize DiskInfo. Just be called before any other functions. More... | |
static int | num_disks () |
Returns the number of (logical) disks on the system. More... | |
static int | disk_id (const char *path) |
static const std::string & | device_name (int disk_id) |
Returns the device name (e.g. sda) for disk_id. More... | |
static bool | is_rotational (int disk_id) |
static std::string | DebugString () |
Static Private Member Functions | |
static void | GetDeviceNames () |
Static Private Attributes | |
static bool | initialized_ |
static std::vector< Disk > | disks_ |
All disks. More... | |
static std::map< dev_t, int > | device_id_to_disk_id_ |
mapping of dev_ts to disk ids More... | |
static std::map< std::string, int > | disk_name_to_disk_id_ |
mapping of devices names to disk ids More... | |
static int | num_datanode_dirs_ |
DiskInfo is an interface to query for the disk information at runtime. This contains information about the system as well as the specific data node configuration. This information is pulled from /proc/partitions. TODO: datanode information not implemented
Definition at line 32 of file disk-info.h.
|
static |
Definition at line 127 of file disk-info.cc.
References disks_, initialized_, and num_disks().
Referenced by impala::Webserver::RootHandler(), and impala::TEST().
|
inlinestatic |
Returns the device name (e.g. sda) for disk_id.
Definition at line 64 of file disk-info.h.
References disk_id(), and disks_.
Referenced by impala::TEST().
|
static |
Returns the 0-based disk index for 'path' (path must be a FS path, not hdfs path).
Definition at line 119 of file disk-info.cc.
References device_id_to_disk_id_.
Referenced by impala::TmpFileMgr::File::AllocateSpace(), device_name(), GetDeviceNames(), is_rotational(), and impala::TEST().
|
staticprivate |
Definition at line 49 of file disk-info.cc.
References device_id_to_disk_id_, disk_id(), disk_name_to_disk_id_, disks_, and impala::name.
Referenced by Init().
|
static |
Initialize DiskInfo. Just be called before any other functions.
Definition at line 114 of file disk-info.cc.
References GetDeviceNames(), and initialized_.
Referenced by main().
|
inlinestatic |
Definition at line 70 of file disk-info.h.
References disk_id(), and disks_.
Referenced by impala::DiskIoMgr::Init().
|
inlinestatic |
Returns the number of (logical) disks on the system.
Definition at line 38 of file disk-info.h.
References disks_, and initialized_.
Referenced by DebugString(), impala::DiskIoMgr::DiskIoMgr(), impala::HdfsScanNode::HdfsScanNode(), and impala::HdfsScanNode::Open().
|
staticprivate |
mapping of dev_ts to disk ids
Definition at line 99 of file disk-info.h.
Referenced by disk_id(), and GetDeviceNames().
|
staticprivate |
mapping of devices names to disk ids
Definition at line 102 of file disk-info.h.
Referenced by GetDeviceNames().
|
staticprivate |
All disks.
Definition at line 96 of file disk-info.h.
Referenced by DebugString(), device_name(), GetDeviceNames(), is_rotational(), and num_disks().
|
staticprivate |
Definition at line 79 of file disk-info.h.
Referenced by DebugString(), Init(), and num_disks().
|
staticprivate |
Definition at line 104 of file disk-info.h.