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

Class ScanRangeComparator

be/src/exec/scan-range-queue-mt.h:85–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 DISALLOW_COPY_AND_ASSIGN(ScanRangeQueueMt);
84
85 struct ScanRangeComparator {
86 public:
87 bool Less(const io::ScanRange* lhs, const io::ScanRange* rhs) const {
88 DCHECK(lhs != nullptr);
89 DCHECK(rhs != nullptr);
90 if (!lhs->UseHdfsCache() && rhs->UseHdfsCache()) return true;
91 if (lhs->UseHdfsCache() && !rhs->UseHdfsCache()) return false;
92 return lhs->bytes_to_read() < rhs->bytes_to_read();
93 }
94 };
95
96 std::mutex scan_range_queue_lock_;
97 std::queue<io::ScanRange*> high_prio_scan_ranges_;

Callers 1

TEST_FFunction · 0.85

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.68