Print the detailed query stats to the caller using the proper serializer @param query The query to answer to @throws BadRequestException if the API version hasn't been implemented yet
(final HttpQuery query)
| 327 | * yet |
| 328 | */ |
| 329 | private void printQueryStats(final HttpQuery query) { |
| 330 | switch (query.apiVersion()) { |
| 331 | case 0: |
| 332 | case 1: |
| 333 | query.sendReply(query.serializer().formatQueryStatsV1( |
| 334 | QueryStats.getRunningAndCompleteStats())); |
| 335 | break; |
| 336 | default: |
| 337 | throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, |
| 338 | "Requested API version not implemented", "Version " + |
| 339 | query.apiVersion() + " is not implemented"); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | /** |
| 344 | * Implements the StatsCollector with ASCII style output. Builds a string |
no test coverage detected