| 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_; |