You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/05/11 15:34:15 UTC

[GitHub] [flink] Myasuka opened a new pull request, #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Myasuka opened a new pull request, #19701:
URL: https://github.com/apache/flink/pull/19701

   ## What is the purpose of the change
   
   Introduce and expose RocksDB statistics as metrics.
   
   
   ## Brief change log
   
     - Introduce RocksDB statistics based metrics.
     - Expose these native metrics via `RocksDBNativeMetricMonitor`.
   
   
   ## Verifying this change
   
   This change added tests and can be verified as follows: `RocksDBNativeMetricMonitorTest`.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? docs
   


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

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


[GitHub] [flink] Myasuka commented on a diff in pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka commented on code in PR #19701:
URL: https://github.com/apache/flink/pull/19701#discussion_r917425856


##########
docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html:
##########
@@ -26,6 +26,18 @@
             <td>Boolean</td>
             <td>Monitor block cache capacity.</td>
         </tr>
+        <tr>

Review Comment:
   Thanks for the reminder, and I will update the `config.md`.



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

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


[GitHub] [flink] Myasuka commented on pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka commented on PR #19701:
URL: https://github.com/apache/flink/pull/19701#issuecomment-1183909941

   @masteryhx Thanks for the review, and I will merge this PR since the CI is green finally.


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

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


[GitHub] [flink] masteryhx commented on pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
masteryhx commented on PR #19701:
URL: https://github.com/apache/flink/pull/19701#issuecomment-1179957769

   LGTM


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

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


[GitHub] [flink] flinkbot commented on pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19701:
URL: https://github.com/apache/flink/pull/19701#issuecomment-1123941379

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "21e83895d4427d6e4e0a76891c715d8ad2a276b0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "21e83895d4427d6e4e0a76891c715d8ad2a276b0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 21e83895d4427d6e4e0a76891c715d8ad2a276b0 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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

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


[GitHub] [flink] masteryhx commented on a diff in pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
masteryhx commented on code in PR #19701:
URL: https://github.com/apache/flink/pull/19701#discussion_r873506503


##########
docs/layouts/shortcodes/generated/rocksdb_native_metric_configuration.html:
##########
@@ -26,6 +26,18 @@
             <td>Boolean</td>
             <td>Monitor block cache capacity.</td>
         </tr>
+        <tr>

Review Comment:
   We may also need to add some descriptions about the new statistics in the "RocksDB Native Metrics" module of "config.md".
   As you could see current content: "The metrics here are scoped to the operators and then further broken down by column family;".



##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java:
##########
@@ -227,11 +241,77 @@ public class RocksDBNativeMetricOptions implements Serializable {
             ConfigOptions.key(METRICS_COLUMN_FAMILY_AS_VARIABLE_KEY)
                     .booleanType()
                     .defaultValue(false)
-                    .withDescription("Whether to expose the column family as a variable.");
+                    .withDescription(
+                            "Whether to expose the column family as a variable for RocksDB property based metrics.");
+
+    // --------------------------------------------------------------------------------------------
+    //  RocksDB statistics based metrics, report at database level
+    // --------------------------------------------------------------------------------------------
+
+    public static final ConfigOption<Boolean> MONITOR_BLOCK_CACHE_HIT =

Review Comment:
   Could we also create a new class called "RocksDBStatistics" and use it just like "RocksDBProperty" ?
   Maybe it could be clearer to me. WDYT?



##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java:
##########
@@ -506,13 +622,21 @@ public Collection<String> getProperties() {
         return Collections.unmodifiableCollection(properties);
     }
 
+    public Collection<TickerType> getMonitorTickerTypes() {

Review Comment:
   nit: add comments just like getProperties.
   ditto: isStatisticsEnabled.



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

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


[GitHub] [flink] Myasuka commented on pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka commented on PR #19701:
URL: https://github.com/apache/flink/pull/19701#issuecomment-1181241854

   @flinkbot run azure


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

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


[GitHub] [flink] Myasuka commented on pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka commented on PR #19701:
URL: https://github.com/apache/flink/pull/19701#issuecomment-1181660101

   @flinkbot run azure 


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

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


[GitHub] [flink] Myasuka commented on a diff in pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka commented on code in PR #19701:
URL: https://github.com/apache/flink/pull/19701#discussion_r917426444


##########
flink-state-backends/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/RocksDBNativeMetricOptions.java:
##########
@@ -227,11 +241,77 @@ public class RocksDBNativeMetricOptions implements Serializable {
             ConfigOptions.key(METRICS_COLUMN_FAMILY_AS_VARIABLE_KEY)
                     .booleanType()
                     .defaultValue(false)
-                    .withDescription("Whether to expose the column family as a variable.");
+                    .withDescription(
+                            "Whether to expose the column family as a variable for RocksDB property based metrics.");
+
+    // --------------------------------------------------------------------------------------------
+    //  RocksDB statistics based metrics, report at database level
+    // --------------------------------------------------------------------------------------------
+
+    public static final ConfigOption<Boolean> MONITOR_BLOCK_CACHE_HIT =

Review Comment:
   To be honest, I think previous `RocksDBProperty` is a bit complex, and I prefer to use the full metrics name in the source code as it could be easily searched.



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

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


[GitHub] [flink] Myasuka merged pull request #19701: [FLINK-24786][state] Introduce and expose RocksDB statistics as metrics

Posted by GitBox <gi...@apache.org>.
Myasuka merged PR #19701:
URL: https://github.com/apache/flink/pull/19701


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

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