[ 
https://issues.apache.org/jira/browse/HBASE-10213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13854189#comment-13854189
 ] 

Andrew Purtell commented on HBASE-10213:
----------------------------------------

To get a good HadoopQA result, it will need a patch against trunk. 

{code}
index 3831bba..8315c3a 100644
--- 
src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
+++ 
src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
@@ -458,6 +458,7 @@ public class ReplicationSource extends Thread
       throws IOException{
     long seenEntries = 0;
     this.repLogReader.seek();
+    long persitionBeforeRead = this.repLogReader.getPosition();
     HLog.Entry entry =
         this.repLogReader.readNextAndSetPosition();
     while (entry != null) {
{code}

"persitionBeforeRead" should be "positionBeforeRead".

{code}
index da0905c..e32a3bc 100644
--- 
src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java
+++ 
src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceMetrics.java
@@ -66,6 +66,9 @@ public class ReplicationSourceMetrics implements Updater {
    */
   public final MetricsIntValue sizeOfLogQueue =
       new MetricsIntValue("sizeOfLogQueue", registry);
+  
+  /** Rate of log entries read by the source */
+  public MetricsRate logReadRateInByte = new MetricsRate("logReadRateInByte", 
registry);
{code}

The usual convention for names with units is to pluralize the unit, so 
"logReadRateInBytes"

> Add read log size per second metrics for replication source
> -----------------------------------------------------------
>
>                 Key: HBASE-10213
>                 URL: https://issues.apache.org/jira/browse/HBASE-10213
>             Project: HBase
>          Issue Type: Improvement
>          Components: metrics, Replication
>    Affects Versions: 0.94.14
>            Reporter: cuijianwei
>            Assignee: cuijianwei
>            Priority: Minor
>         Attachments: HBASE-10213-0.94-v1.patch
>
>
> The current metrics of replication source contain logEditsReadRate, 
> shippedBatchesRate, etc, which could indicate how fast the data replicated to 
> peer cluster to some extent. However, it is not clear enough to know how many 
> bytes replicating to peer cluster from these metrics. In production 
> environment, it may be important to know the size of replicating data per 
> second because the services may be affected if the network become busy.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to