adoroszlai commented on a change in pull request #142: HDDS-2448 Delete
container command should used a thread pool
URL: https://github.com/apache/hadoop-ozone/pull/142#discussion_r347895678
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/DeleteContainerCommandHandler.java
##########
@@ -71,11 +88,26 @@ public void handle(final SCMCommand command,
@Override
public int getInvocationCount() {
- return this.invocationCount;
+ return this.invocationCount.get();
}
@Override
public long getAverageRunTime() {
- return invocationCount == 0 ? 0 : totalTime / invocationCount;
+ return invocationCount.get() == 0 ?
+ 0 : totalTime.get() / invocationCount.get();
Review comment:
The result of `invocationCount.get()` could be saved in a local variable for
consistency.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]