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

Method call

src/tsd/QueryExecutor.java:545–580  ·  view source on GitHub ↗
(final Object obj)

Source from the content-addressed store, hash-verified

543 /** Final callback to close out the JSON array and return our results */
544 class FinalCB implements Callback<ChannelBuffer, Object> {
545 public ChannelBuffer call(final Object obj)
546 throws Exception {
547 json.writeEndArray();
548
549// ts_query.getQueryStats().setTimeSerialization(
550// DateTime.currentTimeMillis() - start);
551 ts_query.getQueryStats().markSerializationSuccessful();
552
553 // dump overall stats as an extra object in the array
554// if (true) {
555// final QueryStats stats = ts_query.getQueryStats();
556// json.writeFieldName("statsSummary");
557// json.writeStartObject();
558// //json.writeStringField("hostname", TSDB.getHostname());
559// //json.writeNumberField("runningQueries", stats.getNumRunningQueries());
560// json.writeNumberField("datapoints", stats.getAggregatedSize());
561// json.writeNumberField("rawDatapoints", stats.getSize());
562// //json.writeNumberField("rowsFetched", stats.getRowsFetched());
563// json.writeNumberField("aggregationTime", stats.getTimeAggregation());
564// json.writeNumberField("serializationTime", stats.getTimeSerialization());
565// json.writeNumberField("storageTime", stats.getTimeStorage());
566// json.writeNumberField("timeTotal",
567// ((double)stats.getTimeTotal() / (double)1000000));
568// json.writeEndObject();
569// }
570
571 // dump the original query
572 if (true) {
573 json.writeFieldName("query");
574 json.writeObject(QueryExecutor.this.query);
575 }
576 // IMPORTANT Make sure the close the JSON array and the generator
577 json.writeEndObject();
578 json.close();
579 return response;
580 }
581 }
582
583 // trigger the callback chain here

Callers

nothing calls this directly

Calls 3

getQueryStatsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected