You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/22 17:24:35 UTC

[GitHub] [iceberg] rdblue commented on a diff in pull request #5328: API: Deprecate Counter#count() / Add Counter#value()

rdblue commented on code in PR #5328:
URL: https://github.com/apache/iceberg/pull/5328#discussion_r927856938


##########
api/src/main/java/org/apache/iceberg/metrics/MetricsContext.java:
##########
@@ -66,11 +66,20 @@ default void initialize(Map<String, String> properties) {
      * Reporting count is optional if the counter is reporting externally.
      *
      * @return current count if available
+     * @deprecated Use {@link Counter#value()}
      */
+    @Deprecated
     default Optional<T> count() {
       return Optional.empty();
     }
 
+    /**
+     * Reports the current count.
+     *
+     * @return The current count
+     */
+    T value();

Review Comment:
   I'd say let's add the default.



-- 
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@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org