You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/05 00:12:31 UTC

[GitHub] [pulsar] Anonymitaet commented on a change in pull request #11555: [Offload] Add offload performance metrics for tiered storage.

Anonymitaet commented on a change in pull request #11555:
URL: https://github.com/apache/pulsar/pull/11555#discussion_r683039045



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloaderMXBean.java
##########
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger;
+
+import java.util.concurrent.TimeUnit;
+import org.apache.bookkeeper.common.annotation.InterfaceAudience;
+import org.apache.bookkeeper.common.annotation.InterfaceStability;
+import org.apache.bookkeeper.mledger.util.StatsBuckets;
+import org.apache.pulsar.common.stats.Rate;
+
+import java.util.Map;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Management Bean for a {@link LedgerOffloader}.
+ */
+@InterfaceAudience.LimitedPrivate
+@InterfaceStability.Stable
+public interface LedgerOffloaderMXBean {
+
+    /**
+     * The ledger offloader name.
+     *
+     * @return ledger offloader name.
+     */
+    String getName();
+
+
+    /**
+     * refresh offloader stats.
+     *
+     * @return
+     */
+    void refreshStats();
+
+
+
+    /**
+     * Record the offload total time.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadTimes();
+
+    /**
+     * Record the offload error count.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadErrors();
+
+    /**
+     * Record the offload rate to storage.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadRates();
+
+
+    /**
+     * Record the read ledger latency
+     *
+     * @return
+     */
+    Map<String, StatsBuckets> getReadLedgerLatencyBuckets();
+
+    /**
+     * Record the write latency to tiered storage.
+     *
+     * @return
+     */
+    Map<String, StatsBuckets> getWriteToStorageLatencyBuckets();
+
+    /**
+     * Record the write to storage error count.
+     *
+     * @return
+     */
+    Map<String, Rate> getWriteToStorageErrors();
+
+    /**
+     * Record read offload index latency

Review comment:
       same comment as previous. pls check overall, thanks

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloaderMXBean.java
##########
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger;
+
+import java.util.concurrent.TimeUnit;
+import org.apache.bookkeeper.common.annotation.InterfaceAudience;
+import org.apache.bookkeeper.common.annotation.InterfaceStability;
+import org.apache.bookkeeper.mledger.util.StatsBuckets;
+import org.apache.pulsar.common.stats.Rate;
+
+import java.util.Map;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Management Bean for a {@link LedgerOffloader}.
+ */
+@InterfaceAudience.LimitedPrivate
+@InterfaceStability.Stable
+public interface LedgerOffloaderMXBean {
+
+    /**
+     * The ledger offloader name.
+     *
+     * @return ledger offloader name.
+     */
+    String getName();
+
+
+    /**
+     * refresh offloader stats.
+     *
+     * @return
+     */
+    void refreshStats();
+
+
+
+    /**
+     * Record the offload total time.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadTimes();
+
+    /**
+     * Record the offload error count.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadErrors();
+
+    /**
+     * Record the offload rate to storage.
+     *
+     * @return
+     */
+    Map<String, Rate> getOffloadRates();
+
+
+    /**
+     * Record the read ledger latency

Review comment:
       Pls add a period at the end of the sentence.

##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/LedgerOffloaderMXBean.java
##########
@@ -0,0 +1,139 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.bookkeeper.mledger;
+
+import java.util.concurrent.TimeUnit;
+import org.apache.bookkeeper.common.annotation.InterfaceAudience;
+import org.apache.bookkeeper.common.annotation.InterfaceStability;
+import org.apache.bookkeeper.mledger.util.StatsBuckets;
+import org.apache.pulsar.common.stats.Rate;
+
+import java.util.Map;
+import java.util.concurrent.atomic.LongAdder;
+
+/**
+ * Management Bean for a {@link LedgerOffloader}.
+ */
+@InterfaceAudience.LimitedPrivate
+@InterfaceStability.Stable
+public interface LedgerOffloaderMXBean {
+
+    /**
+     * The ledger offloader name.
+     *
+     * @return ledger offloader name.
+     */
+    String getName();
+
+
+    /**
+     * refresh offloader stats.

Review comment:
       Please capitalize the first word




-- 
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: commits-unsubscribe@pulsar.apache.org

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