duongkame commented on code in PR #3865:
URL: https://github.com/apache/ozone/pull/3865#discussion_r1005076786
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TypedTable.java:
##########
@@ -72,9 +73,9 @@
public TypedTable(
Table<byte[], byte[]> rawTable,
CodecRegistry codecRegistry, Class<KEY> keyType,
- Class<VALUE> valueType) throws IOException {
+ Class<VALUE> valueType, boolean statsEnabled) throws IOException {
Review Comment:
Passing parameters is always the most explicit way of communication between
software components. I think what's missing here is a neat way of passing them
like a Builder or Parameter object.
I think only the tables needing exposing metrics should have stats enabled
initially. And that would avoid other tables from paying the cost of keeping
the counters (mainly on the locks of `AutomicLong`.
On second thought, that cost may be small and eventually, we'll enable
metrics for all tables. So stats should be always there and that leaves the
Table interface intact.
--
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]