code: private Map<MetricQuery, List<Metric>> getSubQueryMetrics(List<MetricQuery> queries) {
  		Map<MetricQuery, Future<List<Metric>>> queryFutureMap = new HashMap<>();
  
  		for (MetricQuery query : queries) {
  			String requestBody = fromEntity(query);
  			String requestUrl = query.getMetricQueryContext().getReadEndPoint() + "/api/query";
  			queryFutureMap.put(query, _executorService.submit(new QueryWorker(requestUrl, query.getMetricQueryContext().getReadEndPoint(), requestBody)));
  		}
  
  		Map<MetricQuery, List<Metric>> subQueryMetricsMap = new HashMap<>();
  
  		for (Entry<MetricQuery, Future<List<Metric>>> entry : queryFutureMap.entrySet()) {
  			List<Metric> metrics = new ArrayList<>();
  			List<Metric> m = null;
  			try {
  				m = entry.getValue().get();
  			} catch (InterruptedException | ExecutionException e) {
  				_logger.warn("Failed to get metrics from TSDB. Reason: " + e.getMessage());
  				try {
  					String readBackupEndPoint = _readBackupEndPointsMap.get(entry.getKey().getMetricQueryContext().getReadEndPoint()); 
  					if (!readBackupEndPoint.isEmpty()) {
  						_logger.warn("Trying to read from Backup endpoint");
  						m = new QueryWorker(readBackupEndPoint + "/api/query", readBackupEndPoint, fromEntity(entry.getKey())).call();
  					}
  				} catch (Exception ex) {
  					_logger.warn("Failed to get metrics from Backup TSDB. Reason: " + ex.getMessage());
  					continue;
  				}
  			}
  
  			if (m != null) {
  				for (Metric metric : m) {
  					if (metric != null) {
  						metric.setQuery(entry.getKey());
  						metrics.add(metric);
  					}
  				}
  			}
  
  			subQueryMetricsMap.put(entry.getKey(), metrics);
  		}
  		return subQueryMetricsMap;
  	}
docs: /* Gets metrics for a list of queries