Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 33D45110FC for ; Fri, 5 Sep 2014 04:07:28 +0000 (UTC) Received: (qmail 22264 invoked by uid 500); 5 Sep 2014 04:07:28 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 22219 invoked by uid 500); 5 Sep 2014 04:07:28 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 22207 invoked by uid 99); 5 Sep 2014 04:07:27 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2014 04:07:27 +0000 Date: Fri, 5 Sep 2014 04:07:27 +0000 (UTC) From: "Hadoop QA (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-9531) a command line (hbase shell) interface to retreive the replication metrics and show replication lag MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-9531?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1412= 2376#comment-14122376 ]=20 Hadoop QA commented on HBASE-9531: ---------------------------------- {color:red}-1 overall{color}. Here are the results of testing the latest a= ttachment=20 http://issues.apache.org/jira/secure/attachment/12666640/HBASE-9531-maste= r-v4.patch against trunk revision . ATTACHMENT ID: 12666640 {color:green}+1 @author{color}. The patch does not contain any @author= tags. {color:green}+1 tests included{color}. The patch appears to include 3 = new or modified tests. {color:green}+1 javac{color}. The applied patch does not increase the = total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the = total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any = warning messages. {color:green}+1 findbugs{color}. The patch does not introduce any new = Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not incre= ase the total number of release audit warnings. {color:red}-1 lineLengths{color}. The patch introduces the following l= ines longer than 100: + new java.lang.String[] { "PeerID", "AgeOfLastShippedOp",= "SizeOfLogQueue", "TimeStampOfLastShippedOp", "ReplicationLag", }); + new java.lang.String[] { "NumberOfRequests", "TotalNumberOfR= equests", "UsedHeapMB", "MaxHeapMB", "RegionLoads", "Coprocessors", "Report= StartTime", "ReportEndTime", "InfoServerPort", "ReplLoadSource", "ReplLoadS= ink", }); + if (!@admin.getConfiguration().getBoolean(org.apache.hadoop.hbase.= HConstants::REPLICATION_ENABLE_KEY, org.apache.hadoop.hbase.HConstants::REP= LICATION_ENABLE_DEFAULT)) + rSinkString << ", TimeStampsOfLastAppliedOp=3D" + (java.util.D= ate.new(rLoadSink.getTimeStampsOfLastAppliedOp())).toString() + rSourceString << ", TimeStampsOfLastShippedOp=3D" + (java.ut= il.Date.new(rLoadSource.getTimeStampOfLastShippedOp())).toString() {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.TestRegionRebalancing Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10718//te= stReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/1071= 8//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10718//= console This message is automatically generated. > a command line (hbase shell) interface to retreive the replication metric= s and show replication lag > -------------------------------------------------------------------------= -------------------------- > > Key: HBASE-9531 > URL: https://issues.apache.org/jira/browse/HBASE-9531 > Project: HBase > Issue Type: New Feature > Components: Replication > Affects Versions: 0.99.0 > Reporter: Demai Ni > Assignee: Demai Ni > Fix For: 0.99.0, 2.0.0, 0.98.7 > > Attachments: HBASE-9531-master-v1.patch, HBASE-9531-master-v1.pat= ch, HBASE-9531-master-v1.patch, HBASE-9531-master-v2.patch, HBASE-9531-mast= er-v3.patch, HBASE-9531-master-v4.patch, HBASE-9531-trunk-v0.patch, HBASE-9= 531-trunk-v0.patch > > > This jira is to provide a command line (hbase shell) interface to retreiv= e the replication metrics info such as:ageOfLastShippedOp, timeStampsOfLast= ShippedOp, sizeOfLogQueue ageOfLastAppliedOp, and timeStampsOfLastAppliedOp= . And also to provide a point of time info of the lag of replication(source= only) > Understand that hbase is using Hadoop metrics(http://hbase.apache.org/met= rics.html), which is a common way to monitor metric info. This Jira is to s= erve as a light-weight client interface, comparing to a completed(certainly= better, but heavier)GUI monitoring package. I made the code works on 0.94.= 9 now, and like to use this jira to get opinions about whether the feature = is valuable to other users/workshop. If so, I will build a trunk patch.=20 > All inputs are greatly appreciated. Thank you! > The overall design is to reuse the existing logic which supports hbase sh= ell command 'status', and invent a new module, called ReplicationLoad. In = HRegionServer.buildServerLoad() , use the local replication service objects= to get their loads which could be wrapped in a ReplicationLoad object and= then simply pass it to the ServerLoad. In ReplicationSourceMetrics and Rep= licationSinkMetrics, a few getters and setters will be created, and ask Rep= lication to build a "ReplicationLoad". (many thanks to Jean-Daniel for his= kindly suggestions through dev email list) > the replication lag will be calculated for source only, and use this form= ula:=20 > {code:title=3DReplication lag|borderStyle=3Dsolid} > =09if sizeOfLogQueue !=3D 0 then max(ageOfLastShippedOp, (current time - = timeStampsOfLastShippedOp)) //err on the large side > =09else if (current time - timeStampsOfLastShippedOp) < 2* ageOfLastShipp= edOp then lag =3D ageOfLastShippedOp // last shipped happen recently=20 > else lag =3D 0 // last shipped may happens last night, so NO real= lag although ageOfLastShippedOp is non-zero > {code} > External will look something like: > {code:title=3Dstatus 'replication'|borderStyle=3Dsolid} > hbase(main):001:0> status 'replication' > version 0.94.9 > 3 live servers > =C2=A0=C2=A0=C2=A0 hdtest017.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D14, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14= :49:48 PDT 2013 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D0, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:48:48 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest018.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D0, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14:= 48:48 PDT 2013 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D14, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:50:59 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest015.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D0, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14:= 48:48 PDT 2013 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D0, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:48:48 PDT 2013 > hbase(main):002:0> status 'replication','source' > version 0.94.9 > 3 live servers > =C2=A0=C2=A0=C2=A0 hdtest017.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D14, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14= :49:48 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest018.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D0, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14:= 48:48 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest015.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SOURCE:PeerID=3D1, ageOfLastSh= ippedOp=3D0, sizeOfLogQueue=3D0, timeStampsOfLastShippedOp=3DWed Sep 04 14:= 48:48 PDT 2013 > hbase(main):003:0> status 'replication','sink' > version 0.94.9 > 3 live servers > =C2=A0=C2=A0=C2=A0 hdtest017.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D0, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:48:48 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest018.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D14, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:50:59 PDT 2013 > =C2=A0=C2=A0=C2=A0 hdtest015.svl.ibm.com: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 SINK=C2=A0 :AgeOfLastAppliedOp= =3D0, TimeStampsOfLastAppliedOp=3DWed Sep 04 14:48:48 PDT 2013 > hbase(main):003:0> status 'replication','lag'=20 > version 0.94.9 > 3 live servers > =C2=A0=C2=A0=C2=A0 hdtest017.svl.ibm.com: lag =3D 0 > =C2=A0=C2=A0=C2=A0 hdtest018.svl.ibm.com: lag =3D 14 > =C2=A0=C2=A0=C2=A0 hdtest015.svl.ibm.com: lag =3D 0 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)