| 748 | } |
| 749 | |
| 750 | private void validateMultigetData(List<KeyValue> kvs, |
| 751 | Map<byte[], List<Annotation>> annotations, |
| 752 | List<SimpleEntry<byte[], List<HistogramDataPoint>>> histograms) { |
| 753 | int tasks = finished_multi_get_cnt.incrementAndGet(); |
| 754 | |
| 755 | if (kvs.size() > 0) { |
| 756 | kvsmap.put(tasks, kvs); |
| 757 | } |
| 758 | |
| 759 | if (annotMap != null) { |
| 760 | for (byte[] key : annotations.keySet()) { |
| 761 | List<Annotation> notes = annotations.get(key); |
| 762 | |
| 763 | if (notes.size() > 0) { |
| 764 | annotMap.put(key, notes); |
| 765 | } |
| 766 | } |
| 767 | } |
| 768 | |
| 769 | if (histograms.size() > 0) { |
| 770 | histMap.put(tasks, histograms); |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | private boolean checkAllFinishAndTriggerCallback() { |
| 775 | if (multi_get_wait_cnt == finished_multi_get_cnt.get()) { |