You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "hemantk-12 (via GitHub)" <gi...@apache.org> on 2023/09/07 18:53:52 UTC

[GitHub] [ozone] hemantk-12 commented on a diff in pull request #5249: HDDS-9212. HeatMap UI doesn't load On Disabling & Enable Recon HeatMap using Feature Flag.

hemantk-12 commented on code in PR #5249:
URL: https://github.com/apache/ozone/pull/5249#discussion_r1318999390


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/AccessHeatMapEndpoint.java:
##########
@@ -88,4 +92,19 @@ public Response getReadAccessMetaData(
     }
     return Response.ok(entityReadAccessHeatMapResponse).build();
   }
+
+  private static void checkIfHeatMapFeatureIsEnabled() {
+    FeatureProvider.Feature heatMapFeature = null;
+    List<FeatureProvider.Feature> allDisabledFeatures =
+        FeatureProvider.getAllDisabledFeatures();
+    for (FeatureProvider.Feature feature : allDisabledFeatures) {
+      if (feature.getFeatureName().equals("HeatMap")) {

Review Comment:
   nit: to avoid NPE.
   Constant should be on left side e.g. `"HeatMap".equals(feature.getFeatureName())` or use `Objects.equals()`.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org