You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2023/06/01 13:23:15 UTC

[GitHub] [ozone] adoroszlai opened a new pull request, #4816: HDDS-8744. Clean up checked functional interfaces

adoroszlai opened a new pull request, #4816:
URL: https://github.com/apache/ozone/pull/4816

   ## What changes were proposed in this pull request?
   
   Clean up code related to `Checked*` functional interfaces:
   
    * `CheckedBiFunction` used in `XceiverClientSpi` and `OMVolumeAclRequest` should be `CheckedBiConsumer` (no return value)
    * `CheckedFunction` in `ExecutionUtil` is really a `CheckedRunnable` (no return value)
    * `CheckedBiFunction` is defined in multiple integration tests
    * reuse interfaces from Ratis instead of duplicating them
   
   https://issues.apache.org/jira/browse/HDDS-8744
   
   ## How was this patch tested?
   
   https://github.com/adoroszlai/hadoop-ozone/actions/runs/5143653792


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


[GitHub] [ozone] adoroszlai commented on pull request #4816: HDDS-8744. Clean up checked functional interfaces

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4816:
URL: https://github.com/apache/ozone/pull/4816#issuecomment-1572276496

   > I have one minor nitpick/question
   
   Thanks @Galsza for taking a look.  I don't see the question.


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


[GitHub] [ozone] adoroszlai merged pull request #4816: HDDS-8744. Clean up checked functional interfaces

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #4816:
URL: https://github.com/apache/ozone/pull/4816


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


[GitHub] [ozone] Galsza commented on a diff in pull request #4816: HDDS-8744. Clean up checked functional interfaces

Posted by "Galsza (via GitHub)" <gi...@apache.org>.
Galsza commented on code in PR #4816:
URL: https://github.com/apache/ozone/pull/4816#discussion_r1213372467


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/TestCSMMetrics.java:
##########
@@ -132,10 +129,10 @@ static void runContainerStateMachineMetrics(
       assertCounter("WriteChunkMsNumOps", 0L, metric);
       double applyTransactionLatency = getDoubleGauge(
           "ApplyTransactionNsAvgTime", metric);
-      assertTrue(applyTransactionLatency == 0.0);
+      assertEquals(0.0, applyTransactionLatency, 0.0);

Review Comment:
   Wouldn't Math.ulp be better for epsilon here? What does 0.0 mean as the epsilon here?



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


[GitHub] [ozone] adoroszlai commented on a diff in pull request #4816: HDDS-8744. Clean up checked functional interfaces

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #4816:
URL: https://github.com/apache/ozone/pull/4816#discussion_r1213389040


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/TestCSMMetrics.java:
##########
@@ -132,10 +129,10 @@ static void runContainerStateMachineMetrics(
       assertCounter("WriteChunkMsNumOps", 0L, metric);
       double applyTransactionLatency = getDoubleGauge(
           "ApplyTransactionNsAvgTime", metric);
-      assertTrue(applyTransactionLatency == 0.0);
+      assertEquals(0.0, applyTransactionLatency, 0.0);

Review Comment:
   IDEA simplified the assertion to this one.  I think it's the same as `assertEquals(0.0, applyTransactionLatency)`, without any `delta`.



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


[GitHub] [ozone] adoroszlai commented on pull request #4816: HDDS-8744. Clean up checked functional interfaces

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #4816:
URL: https://github.com/apache/ozone/pull/4816#issuecomment-1574229566

   Thanks @Galsza, @szetszwo for the review.


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