anmolanmol1234 commented on code in PR #8056:
URL: https://github.com/apache/hadoop/pull/8056#discussion_r2545918450


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsInputStream.java:
##########
@@ -920,7 +920,7 @@ public void 
testPrefetchReadAddsPriorityHeaderWithDifferentConfigs()
 
     Configuration configuration2 = new Configuration(getRawConfiguration());
     //use the default value for the config: false

Review Comment:
   taken



##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/ReadBufferManagerV2.java:
##########
@@ -1021,6 +1070,30 @@ public double getCpuLoad() {
     return cpuLoad;
   }
 
+  /**
+   * Returns the CPU utilization of the JVM process as a percentage (0–100).
+   */
+  public static double getJvmCpuUtilization() {
+    OperatingSystemMXBean osBean =
+        (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
+    long cpuTime = osBean.getProcessCpuTime();
+    long now = System.nanoTime();
+    if (lastTime == ZERO) {
+      lastCpuTime = cpuTime;
+      lastTime = now;
+      return 0.0; // first call has no previous data

Review Comment:
   removed this piece of code



##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/TestAbfsOutputStream.java:
##########
@@ -256,7 +261,7 @@ public void verifyWriteRequest() throws Exception {
    */
   @Test
   public void verifyWriteRequestOfBufferSizeAndClose() throws Exception {
-
+    AbfsCounters abfsCounters = Mockito.spy(new AbfsCountersImpl(new 
URI("abcd")));

Review Comment:
   if creating mock client handlers, client, abfsrestop, spying abfscounters is 
repeated- then we could have it as a helper method maybe -> was existing code 
will take it up later



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