navinko commented on code in PR #10177:
URL: https://github.com/apache/ozone/pull/10177#discussion_r3211650153


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/StorageDistributionEndpoint.java:
##########
@@ -215,10 +224,22 @@ public Response downloadDataNodeStorageDistribution() {
             v -> v.getReport() != null ? v.getReport().getCommitted() : -1,
             v -> v.getReport() != null ? v.getReport().getReserved() : -1,
             v -> v.getReport() != null ? v.getReport().getMinimumFreeSpace() : 
-1,
-            v -> v.getReport() != null ? v.getMetric().getPendingBlockSize() : 
-1
+            v -> v.getMetric() != null ? v.getMetric().getPendingBlockSize() : 
-1
         );
 
-    return 
ReconUtils.downloadCsv("datanode_storage_and_pending_deletion_stats.csv", 
headers, data, columns);
+    String timestamp = LocalDateTime.now().format(TIMESTAMP_FORMATTER);
+    // Retrieve clusterId from ReconContext
+    String clusterID = "UnknownCluster";
+    try {

Review Comment:
   yes make sense , corrrected.



##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/api/StorageDistributionEndpoint.java:
##########
@@ -215,10 +224,22 @@ public Response downloadDataNodeStorageDistribution() {
             v -> v.getReport() != null ? v.getReport().getCommitted() : -1,
             v -> v.getReport() != null ? v.getReport().getReserved() : -1,
             v -> v.getReport() != null ? v.getReport().getMinimumFreeSpace() : 
-1,
-            v -> v.getReport() != null ? v.getMetric().getPendingBlockSize() : 
-1
+            v -> v.getMetric() != null ? v.getMetric().getPendingBlockSize() : 
-1
         );
 
-    return 
ReconUtils.downloadCsv("datanode_storage_and_pending_deletion_stats.csv", 
headers, data, columns);
+    String timestamp = LocalDateTime.now().format(TIMESTAMP_FORMATTER);
+    // Retrieve clusterId from ReconContext
+    String clusterID = "UnknownCluster";
+    try {
+      if (reconContext != null && 
StringUtils.isNotBlank(reconContext.getClusterId())) {

Review Comment:
   done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to