MCPcopy Create free account
hub / github.com/apache/impala / DeviceWriteConcurrency

Function DeviceWriteConcurrency

be/src/runtime/io/data-cache.cc:606–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604}
605
606static int32_t DeviceWriteConcurrency(const string& path) {
607 if (FLAGS_data_cache_write_concurrency > 0) {
608 return FLAGS_data_cache_write_concurrency;
609 }
610
611 int path_disk_id = DiskInfo::disk_id(path.c_str());
612 if (path_disk_id < 0) {
613 LOG(WARNING) << "Device for path " << path << " could not be determined. "
614 << "Setting data_cache_write_concurrency="
615 << THREADS_PER_ROTATIONAL_DISK << ".";
616 return THREADS_PER_ROTATIONAL_DISK;
617 }
618
619 const std::string& device_name = DiskInfo::device_name(path_disk_id);
620
621 int32_t write_concurrency = THREADS_PER_ROTATIONAL_DISK;
622 const char* disk_type = "rotational";
623 if (!DiskInfo::is_rotational(path_disk_id)) {
624 write_concurrency = THREADS_PER_SOLID_STATE_DISK;
625 disk_type = "solid state";
626 }
627 LOG(INFO) << "Default data_cache_write_concurrency=" << write_concurrency
628 << " for " << disk_type << " disk " << device_name;
629 return write_concurrency;
630}
631
632DataCache::Partition::Partition(
633 int32_t index, const string& path, int64_t capacity, int max_opened_files,

Callers 1

InitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected