/** * Write the version of Pinot components to the log at info level. */ public static void logVersions() { for (Map.Entry<String, String> titleVersionEntry : getComponentVersions().entrySet()) { LOGGER.info("Using {} {}", titleVersionEntry.getKey(), titleVersionEntry.getValue()); } }
@GET @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Get version number of Pinot components") @ApiResponses(value = {@ApiResponse(code = 200, message = "Success")}) public String getVersionNumber() { try { return JsonUtils.objectToString(Utils.getComponentVersions()); } catch (JsonProcessingException e) { throw new RuntimeException(e); } } }
public PinotControllerResponseFilter() { String controllerHost = NetUtil.getHostnameOrAddress(); if (controllerHost != null) { _controllerHost = controllerHost; } else { _controllerHost = UNKNOWN; } String controllerVersion = Utils.getComponentVersions().get(CONTROLLER_COMPONENT); if (controllerVersion != null) { _controllerVersion = controllerVersion; } else { _controllerVersion = UNKNOWN; } }