16 #ifndef IMPALA_UTIL_DISK_INFO_H
17 #define IMPALA_UTIL_DISK_INFO_H
22 #include <boost/cstdint.hpp>
44 static int num_datanode_dirs() {
54 static int disk_id(
int datanode_dir_idx) {
65 DCHECK_GE(disk_id, 0);
66 DCHECK_LT(disk_id,
disks_.size());
71 DCHECK_GE(disk_id, 0);
72 DCHECK_LT(disk_id,
disks_.size());
string path("/usr/lib/sasl2:/usr/lib64/sasl2:/usr/local/lib/sasl2:/usr/lib/x86_64-linux-gnu/sasl2")
static const std::string & device_name(int disk_id)
Returns the device name (e.g. sda) for disk_id.
static int num_disks()
Returns the number of (logical) disks on the system.
static void Init()
Initialize DiskInfo. Just be called before any other functions.
Disk(const std::string &name="", int id=-1, bool is_rotational=true)
static bool is_rotational(int disk_id)
static std::vector< Disk > disks_
All disks.
std::string name
Name of the disk (e.g. sda)
static std::string DebugString()
static int num_datanode_dirs_
static std::map< dev_t, int > device_id_to_disk_id_
mapping of dev_ts to disk ids
static void GetDeviceNames()
static int disk_id(const char *path)
static std::map< std::string, int > disk_name_to_disk_id_
mapping of devices names to disk ids