Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21406

"status 'replication'" should not show SINK if the cluster does not act as sink

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha-1, 2.3.0, 2.4.0, 2.2.5
    • 3.0.0-alpha-1, 2.3.0
    • None
    • None
    • Hide
      Added new metric to differentiate sink startup time from last OP applied time.

      Original behaviour was to always set startup time to TimestampsOfLastAppliedOp, and always show it on "status 'replication'" command, regardless if the sink ever applied any OP.

      This was confusing, specially for scenarios where cluster was just acting as source, the output could lead to wrong interpretations about sink not applying edits or replication being stuck.

      With the new metric, we now compare the two metrics values, assuming that if both are the same, there's never been any OP shipped to the given sink, so output would reflect it more clearly, to something as for example:

      SINK: TimeStampStarted=Thu Dec 06 23:59:47 GMT 2018, Waiting for OPs...
      Show
      Added new metric to differentiate sink startup time from last OP applied time. Original behaviour was to always set startup time to TimestampsOfLastAppliedOp, and always show it on "status 'replication'" command, regardless if the sink ever applied any OP. This was confusing, specially for scenarios where cluster was just acting as source, the output could lead to wrong interpretations about sink not applying edits or replication being stuck. With the new metric, we now compare the two metrics values, assuming that if both are the same, there's never been any OP shipped to the given sink, so output would reflect it more clearly, to something as for example: SINK: TimeStampStarted=Thu Dec 06 23:59:47 GMT 2018, Waiting for OPs...

    Description

      When replicating in 1 way, from source to target, status 'replication' on source always dumps SINK with meaningless metrics. It only makes sense when running the command on target cluster.

      status 'replication' on source, for example. AgeOfLastAppliedOp is always zero and TimeStampsOfLastAppliedOp does not get updated from the time the RS started since it's not acting as sink.

          source-1.com
             SOURCE: PeerID=1, AgeOfLastShippedOp=0, SizeOfLogQueue=0, TimeStampsOfLastShippedOp=Mon Oct 29 23:44:14 PDT 2018, Replication Lag=0
             SINK  : AgeOfLastAppliedOp=0, TimeStampsOfLastAppliedOp=Thu Oct 25 23:56:53 PDT 2018
      

      status 'replication' on target works as expected. SOURCE is empty as it's not acting as source:

          target-1.com
             SOURCE:
             SINK  : AgeOfLastAppliedOp=70, TimeStampsOfLastAppliedOp=Mon Oct 29 23:44:08 PDT 2018
      

      This is because getReplicationLoadSink, called in admin.rb, always returns a value (not null).

      1.X
      https://github.com/apache/hbase/blob/rel/1.4.0/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java#L194-L204

      2.X
      https://github.com/apache/hbase/blob/rel/2.0.0/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerLoad.java#L392-L399

      Attachments

        1. HBASE-21406-master.002.patch
          14 kB
          Wellington Chevreuil
        2. HBASE-21406-master.001.patch
          14 kB
          Wellington Chevreuil
        3. HBASE-21406-branch-1.001.patch
          9 kB
          Wellington Chevreuil
        4. Screen Shot 2018-10-31 at 18.12.54.png
          45 kB
          Wellington Chevreuil

        Issue Links

          Activity

            People

              wchevreuil Wellington Chevreuil
              daisuke.kobayashi Daisuke Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: