org.apache.pinot.common.Utils.getComponentVersions()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.apache.pinot.common.Utils.getComponentVersions()方法的一些代码示例,展示了Utils.getComponentVersions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getComponentVersions()方法的具体详情如下:
包路径:org.apache.pinot.common.Utils
类名称:Utils
方法名:getComponentVersions

Utils.getComponentVersions介绍

[英]Obtains the version numbers of the Pinot components.
[中]获取皮诺元件的版本号。

代码示例

代码示例来源:origin: apache/incubator-pinot

/**
 * 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());
 }
}

代码示例来源:origin: apache/incubator-pinot

@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);
  }
 }
}

代码示例来源:origin: apache/incubator-pinot

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;
 }
}

相关文章