timoninmaxim commented on code in PR #11826: URL: https://github.com/apache/ignite/pull/11826#discussion_r1928611634
########## modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/MetricUtils.java: ########## @@ -234,4 +236,29 @@ public static Map<String, Class<?>> systemViewAttributes(SystemView<?> sysView) return attrs; } + + /** + * Extract system view from systemViewManager. Both "SQL" and "Java" styles of system view name are supported. + * + * @param systemViewManager Manager to extract view from. + * @param viewName System view name. + * @return System view with viewName. Null if the view does not exist. + */ + @Nullable public static SystemView<?> getSystemViewByName(GridSystemViewManager systemViewManager, String viewName) { + SystemView<?> view = systemViewManager.view(viewName); + if (view != null) + return view; + + if (view == null) { Review Comment: At this line view is always `null`. ########## modules/core/src/main/java/org/apache/ignite/internal/processors/metric/impl/MetricUtils.java: ########## @@ -234,4 +236,29 @@ public static Map<String, Class<?>> systemViewAttributes(SystemView<?> sysView) return attrs; } + + /** + * Extract system view from systemViewManager. Both "SQL" and "Java" styles of system view name are supported. + * + * @param systemViewManager Manager to extract view from. + * @param viewName System view name. + * @return System view with viewName. Null if the view does not exist. + */ + @Nullable public static SystemView<?> getSystemViewByName(GridSystemViewManager systemViewManager, String viewName) { Review Comment: We don't use prefixes like `get`, `set`, `is` in function names within internal packages -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org