MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / startFetch

Method startFetch

src/core/MultiGetQuery.java:632–652  ·  view source on GitHub ↗

Start the work of firing up X concurrent get requests.

()

Source from the content-addressed store, hash-verified

630 * Start the work of firing up X concurrent get requests.
631 */
632 private void startFetch() {
633 prepareConcurrentMultiGetTasks();
634
635 // set the time of starting
636 fetch_start_time = System.currentTimeMillis();
637 if (LOG.isDebugEnabled()) {
638 LOG.debug("Start to fetch data using multiget, there will be " + multi_get_wait_cnt
639 + " multigets to call");
640 }
641
642 for (int con_idx = 0; con_idx < concurrency_multi_get; ++con_idx) {
643 final List<MultiGetTask> con_mul_get_tasks = multi_get_tasks.get(con_idx);
644 final int task_index = multi_get_indexs.get(con_idx).incrementAndGet();
645
646 if (task_index < con_mul_get_tasks.size()) {
647 final MultiGetTask task = con_mul_get_tasks.get(task_index);
648 final MulGetCB mgcb = new MulGetCB(con_idx, task.getTSUIDs(), task.getGets());
649 mgcb.fetch();
650 }
651 } // end for
652 }
653
654 /**
655 * Compiles the list of TSUIDs and GetRequests to send to execute against

Callers 2

fetchMethod · 0.95
fetchHistogramMethod · 0.95

Calls 7

getTSUIDsMethod · 0.95
getGetsMethod · 0.95
fetchMethod · 0.95
sizeMethod · 0.65
currentTimeMillisMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected