sklaha commented on code in PR #249:
URL: https://github.com/apache/cassandra-sidecar/pull/249#discussion_r2316675550


##########
adapters/adapters-cassandra41/src/main/java/org/apache/cassandra/sidecar/adapters/cassandra41/Cassandra41StorageOperations.java:
##########
@@ -68,4 +71,14 @@ public void takeSnapshot(@NotNull String tag,
     {
         super.takeSnapshotInternal(tag, keyspace, table, options);
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public long getCompactionThroughputBytesPerSec()
+    {
+        return jmxClient.proxy(StorageJmxOperations.class, 
STORAGE_SERVICE_OBJ_NAME)
+                .getCompactionThroughtputBytesPerSec();

Review Comment:
   Fixed.



##########
adapters/adapters-base/src/main/java/org/apache/cassandra/sidecar/adapters/base/CassandraMetricsOperations.java:
##########
@@ -61,6 +66,29 @@ public class CassandraMetricsOperations implements 
MetricsOperations
     private final ConnectedClientStatsDatabaseAccessor dbAccessor;
     protected final JmxClient jmxClient;
 
+    private static final String METRICS_OBJ_TYPE_KEYSPACE_TABLE_FORMAT = 
"org.apache.cassandra.metrics:type=Table,keyspace=%s,scope=%s,name=%s";
+    private static final String METRICS_OBJ_TYPE_COMPACTION = 
"org.apache.cassandra.metrics:type=Compaction,name=%s";
+
+    // Constants for compaction info map keys
+    // Unique identifier for the compaction session
+    public static final String ID = "id";
+    // Keyspace name being compacted
+    public static final String KEYSPACE = "keyspace";
+    // Column family (table) name being compacted
+    public static final String COLUMNFAMILY = "columnfamily";
+    // Number of bytes already processed in the compaction
+    public static final String COMPLETED = "completed";
+    // Total number of bytes to be processed in the compaction
+    public static final String TOTAL = "total";
+    // Type of compaction task (e.g., COMPACTION, VALIDATION, etc.)
+    public static final String TASK_TYPE = "taskType";
+    // Unique compaction identifier
+    public static final String COMPACTION_ID = "compactionId";
+    // Comma-separated list of SSTable names involved in the compaction
+    public static final String SSTABLES = "sstables";
+    // Directory where compaction output will be written
+    public static final String TARGET_DIRECTORY = "targetDirectory";

Review Comment:
   Fixed.



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

Reply via email to