hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [05/14] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
Date Tue, 02 May 2017 14:58:41 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f63def63/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilter.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilter.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilter.html
index 465af29..65012da 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilter.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilter.html
@@ -318,229 +318,231 @@
 <span class="sourceLineNo">310</span>    MetricsSource source = new MetricsSource(id, singleSourceSource, globalSourceSource);<a name="line.310"></a>
 <span class="sourceLineNo">311</span>    String gaugeName = "gauge";<a name="line.311"></a>
 <span class="sourceLineNo">312</span>    String singleGaugeName = "source.id." + gaugeName;<a name="line.312"></a>
-<span class="sourceLineNo">313</span>    long delta = 1;<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    String counterName = "counter";<a name="line.314"></a>
-<span class="sourceLineNo">315</span>    String singleCounterName = "source.id." + counterName;<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    long count = 2;<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    source.decGauge(gaugeName, delta);<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    source.getMetricsContext();<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    source.getMetricsDescription();<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    source.getMetricsJmxContext();<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    source.getMetricsName();<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    source.incCounters(counterName, count);<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    source.incGauge(gaugeName, delta);<a name="line.323"></a>
-<span class="sourceLineNo">324</span>    source.init();<a name="line.324"></a>
-<span class="sourceLineNo">325</span>    source.removeMetric(gaugeName);<a name="line.325"></a>
-<span class="sourceLineNo">326</span>    source.setGauge(gaugeName, delta);<a name="line.326"></a>
-<span class="sourceLineNo">327</span>    source.updateHistogram(counterName, count);<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>    verify(singleRms).decGauge(singleGaugeName, delta);<a name="line.329"></a>
-<span class="sourceLineNo">330</span>    verify(globalRms).decGauge(gaugeName, delta);<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    verify(globalRms).getMetricsContext();<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    verify(globalRms).getMetricsJmxContext();<a name="line.332"></a>
-<span class="sourceLineNo">333</span>    verify(globalRms).getMetricsName();<a name="line.333"></a>
-<span class="sourceLineNo">334</span>    verify(singleRms).incCounters(singleCounterName, count);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    verify(globalRms).incCounters(counterName, count);<a name="line.335"></a>
-<span class="sourceLineNo">336</span>    verify(singleRms).incGauge(singleGaugeName, delta);<a name="line.336"></a>
-<span class="sourceLineNo">337</span>    verify(globalRms).incGauge(gaugeName, delta);<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    verify(globalRms).init();<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    verify(singleRms).removeMetric(singleGaugeName);<a name="line.339"></a>
-<span class="sourceLineNo">340</span>    verify(globalRms).removeMetric(gaugeName);<a name="line.340"></a>
-<span class="sourceLineNo">341</span>    verify(singleRms).setGauge(singleGaugeName, delta);<a name="line.341"></a>
-<span class="sourceLineNo">342</span>    verify(globalRms).setGauge(gaugeName, delta);<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    verify(singleRms).updateHistogram(singleCounterName, count);<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    verify(globalRms).updateHistogram(counterName, count);<a name="line.344"></a>
-<span class="sourceLineNo">345</span>  }<a name="line.345"></a>
-<span class="sourceLineNo">346</span><a name="line.346"></a>
-<span class="sourceLineNo">347</span>  private void doPut(byte[] row) throws IOException {<a name="line.347"></a>
-<span class="sourceLineNo">348</span>    try (Connection connection = ConnectionFactory.createConnection(conf1)) {<a name="line.348"></a>
-<span class="sourceLineNo">349</span>      doPut(connection, row);<a name="line.349"></a>
-<span class="sourceLineNo">350</span>    }<a name="line.350"></a>
-<span class="sourceLineNo">351</span>  }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>  private void doPut(final Connection connection, final byte [] row) throws IOException {<a name="line.353"></a>
-<span class="sourceLineNo">354</span>    try (Table t = connection.getTable(tableName)) {<a name="line.354"></a>
-<span class="sourceLineNo">355</span>      Put put = new Put(row);<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      put.addColumn(famName, row, row);<a name="line.356"></a>
-<span class="sourceLineNo">357</span>      t.put(put);<a name="line.357"></a>
-<span class="sourceLineNo">358</span>    }<a name="line.358"></a>
-<span class="sourceLineNo">359</span>  }<a name="line.359"></a>
-<span class="sourceLineNo">360</span><a name="line.360"></a>
-<span class="sourceLineNo">361</span>  private static void doAssert(byte[] row) throws Exception {<a name="line.361"></a>
-<span class="sourceLineNo">362</span>    if (ReplicationEndpointForTest.lastEntries == null) {<a name="line.362"></a>
-<span class="sourceLineNo">363</span>      return; // first call<a name="line.363"></a>
-<span class="sourceLineNo">364</span>    }<a name="line.364"></a>
-<span class="sourceLineNo">365</span>    Assert.assertEquals(1, ReplicationEndpointForTest.lastEntries.size());<a name="line.365"></a>
-<span class="sourceLineNo">366</span>    List&lt;Cell&gt; cells = ReplicationEndpointForTest.lastEntries.get(0).getEdit().getCells();<a name="line.366"></a>
-<span class="sourceLineNo">367</span>    Assert.assertEquals(1, cells.size());<a name="line.367"></a>
-<span class="sourceLineNo">368</span>    Assert.assertTrue(Bytes.equals(cells.get(0).getRowArray(), cells.get(0).getRowOffset(),<a name="line.368"></a>
-<span class="sourceLineNo">369</span>      cells.get(0).getRowLength(), row, 0, row.length));<a name="line.369"></a>
-<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
-<span class="sourceLineNo">371</span><a name="line.371"></a>
-<span class="sourceLineNo">372</span>  public static class ReplicationEndpointForTest extends BaseReplicationEndpoint {<a name="line.372"></a>
-<span class="sourceLineNo">373</span>    static UUID uuid = UUID.randomUUID();<a name="line.373"></a>
-<span class="sourceLineNo">374</span>    static AtomicInteger contructedCount = new AtomicInteger();<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    static AtomicInteger startedCount = new AtomicInteger();<a name="line.375"></a>
-<span class="sourceLineNo">376</span>    static AtomicInteger stoppedCount = new AtomicInteger();<a name="line.376"></a>
-<span class="sourceLineNo">377</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.377"></a>
-<span class="sourceLineNo">378</span>    static volatile List&lt;Entry&gt; lastEntries = null;<a name="line.378"></a>
-<span class="sourceLineNo">379</span><a name="line.379"></a>
-<span class="sourceLineNo">380</span>    public ReplicationEndpointForTest() {<a name="line.380"></a>
-<span class="sourceLineNo">381</span>      contructedCount.incrementAndGet();<a name="line.381"></a>
-<span class="sourceLineNo">382</span>    }<a name="line.382"></a>
-<span class="sourceLineNo">383</span><a name="line.383"></a>
-<span class="sourceLineNo">384</span>    @Override<a name="line.384"></a>
-<span class="sourceLineNo">385</span>    public UUID getPeerUUID() {<a name="line.385"></a>
-<span class="sourceLineNo">386</span>      return uuid;<a name="line.386"></a>
-<span class="sourceLineNo">387</span>    }<a name="line.387"></a>
-<span class="sourceLineNo">388</span><a name="line.388"></a>
-<span class="sourceLineNo">389</span>    @Override<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>      replicateCount.incrementAndGet();<a name="line.391"></a>
-<span class="sourceLineNo">392</span>      lastEntries = new ArrayList&lt;&gt;(replicateContext.entries);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>      return true;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>    }<a name="line.394"></a>
-<span class="sourceLineNo">395</span><a name="line.395"></a>
-<span class="sourceLineNo">396</span>    @Override<a name="line.396"></a>
-<span class="sourceLineNo">397</span>    protected void doStart() {<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      startedCount.incrementAndGet();<a name="line.398"></a>
-<span class="sourceLineNo">399</span>      notifyStarted();<a name="line.399"></a>
-<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
-<span class="sourceLineNo">401</span><a name="line.401"></a>
-<span class="sourceLineNo">402</span>    @Override<a name="line.402"></a>
-<span class="sourceLineNo">403</span>    protected void doStop() {<a name="line.403"></a>
-<span class="sourceLineNo">404</span>      stoppedCount.incrementAndGet();<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      notifyStopped();<a name="line.405"></a>
-<span class="sourceLineNo">406</span>    }<a name="line.406"></a>
-<span class="sourceLineNo">407</span>  }<a name="line.407"></a>
-<span class="sourceLineNo">408</span><a name="line.408"></a>
-<span class="sourceLineNo">409</span>  public static class InterClusterReplicationEndpointForTest<a name="line.409"></a>
-<span class="sourceLineNo">410</span>      extends HBaseInterClusterReplicationEndpoint {<a name="line.410"></a>
-<span class="sourceLineNo">411</span><a name="line.411"></a>
-<span class="sourceLineNo">412</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.412"></a>
-<span class="sourceLineNo">413</span>    static boolean failedOnce;<a name="line.413"></a>
-<span class="sourceLineNo">414</span><a name="line.414"></a>
-<span class="sourceLineNo">415</span>    @Override<a name="line.415"></a>
-<span class="sourceLineNo">416</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      boolean success = super.replicate(replicateContext);<a name="line.417"></a>
-<span class="sourceLineNo">418</span>      if (success) {<a name="line.418"></a>
-<span class="sourceLineNo">419</span>        replicateCount.addAndGet(replicateContext.entries.size());<a name="line.419"></a>
-<span class="sourceLineNo">420</span>      }<a name="line.420"></a>
-<span class="sourceLineNo">421</span>      return success;<a name="line.421"></a>
-<span class="sourceLineNo">422</span>    }<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>    @Override<a name="line.424"></a>
-<span class="sourceLineNo">425</span>    protected Replicator createReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.425"></a>
-<span class="sourceLineNo">426</span>      // Fail only once, we don't want to slow down the test.<a name="line.426"></a>
-<span class="sourceLineNo">427</span>      if (failedOnce) {<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        return new DummyReplicator(entries, ordinal);<a name="line.428"></a>
-<span class="sourceLineNo">429</span>      } else {<a name="line.429"></a>
-<span class="sourceLineNo">430</span>        failedOnce = true;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>        return new FailingDummyReplicator(entries, ordinal);<a name="line.431"></a>
-<span class="sourceLineNo">432</span>      }<a name="line.432"></a>
-<span class="sourceLineNo">433</span>    }<a name="line.433"></a>
-<span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>    protected class DummyReplicator extends Replicator {<a name="line.435"></a>
+<span class="sourceLineNo">313</span>    String globalGaugeName = "source." + gaugeName;<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    long delta = 1;<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    String counterName = "counter";<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    String singleCounterName = "source.id." + counterName;<a name="line.316"></a>
+<span class="sourceLineNo">317</span>    String globalCounterName = "source." + counterName;<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    long count = 2;<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    source.decGauge(gaugeName, delta);<a name="line.319"></a>
+<span class="sourceLineNo">320</span>    source.getMetricsContext();<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    source.getMetricsDescription();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    source.getMetricsJmxContext();<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    source.getMetricsName();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>    source.incCounters(counterName, count);<a name="line.324"></a>
+<span class="sourceLineNo">325</span>    source.incGauge(gaugeName, delta);<a name="line.325"></a>
+<span class="sourceLineNo">326</span>    source.init();<a name="line.326"></a>
+<span class="sourceLineNo">327</span>    source.removeMetric(gaugeName);<a name="line.327"></a>
+<span class="sourceLineNo">328</span>    source.setGauge(gaugeName, delta);<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    source.updateHistogram(counterName, count);<a name="line.329"></a>
+<span class="sourceLineNo">330</span><a name="line.330"></a>
+<span class="sourceLineNo">331</span>    verify(singleRms).decGauge(singleGaugeName, delta);<a name="line.331"></a>
+<span class="sourceLineNo">332</span>    verify(globalRms).decGauge(globalGaugeName, delta);<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    verify(globalRms).getMetricsContext();<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    verify(globalRms).getMetricsJmxContext();<a name="line.334"></a>
+<span class="sourceLineNo">335</span>    verify(globalRms).getMetricsName();<a name="line.335"></a>
+<span class="sourceLineNo">336</span>    verify(singleRms).incCounters(singleCounterName, count);<a name="line.336"></a>
+<span class="sourceLineNo">337</span>    verify(globalRms).incCounters(globalCounterName, count);<a name="line.337"></a>
+<span class="sourceLineNo">338</span>    verify(singleRms).incGauge(singleGaugeName, delta);<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    verify(globalRms).incGauge(globalGaugeName, delta);<a name="line.339"></a>
+<span class="sourceLineNo">340</span>    verify(globalRms).init();<a name="line.340"></a>
+<span class="sourceLineNo">341</span>    verify(singleRms).removeMetric(singleGaugeName);<a name="line.341"></a>
+<span class="sourceLineNo">342</span>    verify(globalRms).removeMetric(globalGaugeName);<a name="line.342"></a>
+<span class="sourceLineNo">343</span>    verify(singleRms).setGauge(singleGaugeName, delta);<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    verify(globalRms).setGauge(globalGaugeName, delta);<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    verify(singleRms).updateHistogram(singleCounterName, count);<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    verify(globalRms).updateHistogram(globalCounterName, count);<a name="line.346"></a>
+<span class="sourceLineNo">347</span>  }<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>  private void doPut(byte[] row) throws IOException {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>    try (Connection connection = ConnectionFactory.createConnection(conf1)) {<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      doPut(connection, row);<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span>  }<a name="line.353"></a>
+<span class="sourceLineNo">354</span><a name="line.354"></a>
+<span class="sourceLineNo">355</span>  private void doPut(final Connection connection, final byte [] row) throws IOException {<a name="line.355"></a>
+<span class="sourceLineNo">356</span>    try (Table t = connection.getTable(tableName)) {<a name="line.356"></a>
+<span class="sourceLineNo">357</span>      Put put = new Put(row);<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      put.addColumn(famName, row, row);<a name="line.358"></a>
+<span class="sourceLineNo">359</span>      t.put(put);<a name="line.359"></a>
+<span class="sourceLineNo">360</span>    }<a name="line.360"></a>
+<span class="sourceLineNo">361</span>  }<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>  private static void doAssert(byte[] row) throws Exception {<a name="line.363"></a>
+<span class="sourceLineNo">364</span>    if (ReplicationEndpointForTest.lastEntries == null) {<a name="line.364"></a>
+<span class="sourceLineNo">365</span>      return; // first call<a name="line.365"></a>
+<span class="sourceLineNo">366</span>    }<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    Assert.assertEquals(1, ReplicationEndpointForTest.lastEntries.size());<a name="line.367"></a>
+<span class="sourceLineNo">368</span>    List&lt;Cell&gt; cells = ReplicationEndpointForTest.lastEntries.get(0).getEdit().getCells();<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    Assert.assertEquals(1, cells.size());<a name="line.369"></a>
+<span class="sourceLineNo">370</span>    Assert.assertTrue(Bytes.equals(cells.get(0).getRowArray(), cells.get(0).getRowOffset(),<a name="line.370"></a>
+<span class="sourceLineNo">371</span>      cells.get(0).getRowLength(), row, 0, row.length));<a name="line.371"></a>
+<span class="sourceLineNo">372</span>  }<a name="line.372"></a>
+<span class="sourceLineNo">373</span><a name="line.373"></a>
+<span class="sourceLineNo">374</span>  public static class ReplicationEndpointForTest extends BaseReplicationEndpoint {<a name="line.374"></a>
+<span class="sourceLineNo">375</span>    static UUID uuid = UUID.randomUUID();<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    static AtomicInteger contructedCount = new AtomicInteger();<a name="line.376"></a>
+<span class="sourceLineNo">377</span>    static AtomicInteger startedCount = new AtomicInteger();<a name="line.377"></a>
+<span class="sourceLineNo">378</span>    static AtomicInteger stoppedCount = new AtomicInteger();<a name="line.378"></a>
+<span class="sourceLineNo">379</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    static volatile List&lt;Entry&gt; lastEntries = null;<a name="line.380"></a>
+<span class="sourceLineNo">381</span><a name="line.381"></a>
+<span class="sourceLineNo">382</span>    public ReplicationEndpointForTest() {<a name="line.382"></a>
+<span class="sourceLineNo">383</span>      contructedCount.incrementAndGet();<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    }<a name="line.384"></a>
+<span class="sourceLineNo">385</span><a name="line.385"></a>
+<span class="sourceLineNo">386</span>    @Override<a name="line.386"></a>
+<span class="sourceLineNo">387</span>    public UUID getPeerUUID() {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>      return uuid;<a name="line.388"></a>
+<span class="sourceLineNo">389</span>    }<a name="line.389"></a>
+<span class="sourceLineNo">390</span><a name="line.390"></a>
+<span class="sourceLineNo">391</span>    @Override<a name="line.391"></a>
+<span class="sourceLineNo">392</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.392"></a>
+<span class="sourceLineNo">393</span>      replicateCount.incrementAndGet();<a name="line.393"></a>
+<span class="sourceLineNo">394</span>      lastEntries = new ArrayList&lt;&gt;(replicateContext.entries);<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      return true;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    }<a name="line.396"></a>
+<span class="sourceLineNo">397</span><a name="line.397"></a>
+<span class="sourceLineNo">398</span>    @Override<a name="line.398"></a>
+<span class="sourceLineNo">399</span>    protected void doStart() {<a name="line.399"></a>
+<span class="sourceLineNo">400</span>      startedCount.incrementAndGet();<a name="line.400"></a>
+<span class="sourceLineNo">401</span>      notifyStarted();<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
+<span class="sourceLineNo">403</span><a name="line.403"></a>
+<span class="sourceLineNo">404</span>    @Override<a name="line.404"></a>
+<span class="sourceLineNo">405</span>    protected void doStop() {<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      stoppedCount.incrementAndGet();<a name="line.406"></a>
+<span class="sourceLineNo">407</span>      notifyStopped();<a name="line.407"></a>
+<span class="sourceLineNo">408</span>    }<a name="line.408"></a>
+<span class="sourceLineNo">409</span>  }<a name="line.409"></a>
+<span class="sourceLineNo">410</span><a name="line.410"></a>
+<span class="sourceLineNo">411</span>  public static class InterClusterReplicationEndpointForTest<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      extends HBaseInterClusterReplicationEndpoint {<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>    static boolean failedOnce;<a name="line.415"></a>
+<span class="sourceLineNo">416</span><a name="line.416"></a>
+<span class="sourceLineNo">417</span>    @Override<a name="line.417"></a>
+<span class="sourceLineNo">418</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.418"></a>
+<span class="sourceLineNo">419</span>      boolean success = super.replicate(replicateContext);<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      if (success) {<a name="line.420"></a>
+<span class="sourceLineNo">421</span>        replicateCount.addAndGet(replicateContext.entries.size());<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      }<a name="line.422"></a>
+<span class="sourceLineNo">423</span>      return success;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>    }<a name="line.424"></a>
+<span class="sourceLineNo">425</span><a name="line.425"></a>
+<span class="sourceLineNo">426</span>    @Override<a name="line.426"></a>
+<span class="sourceLineNo">427</span>    protected Replicator createReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.427"></a>
+<span class="sourceLineNo">428</span>      // Fail only once, we don't want to slow down the test.<a name="line.428"></a>
+<span class="sourceLineNo">429</span>      if (failedOnce) {<a name="line.429"></a>
+<span class="sourceLineNo">430</span>        return new DummyReplicator(entries, ordinal);<a name="line.430"></a>
+<span class="sourceLineNo">431</span>      } else {<a name="line.431"></a>
+<span class="sourceLineNo">432</span>        failedOnce = true;<a name="line.432"></a>
+<span class="sourceLineNo">433</span>        return new FailingDummyReplicator(entries, ordinal);<a name="line.433"></a>
+<span class="sourceLineNo">434</span>      }<a name="line.434"></a>
+<span class="sourceLineNo">435</span>    }<a name="line.435"></a>
 <span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>      private int ordinal;<a name="line.437"></a>
+<span class="sourceLineNo">437</span>    protected class DummyReplicator extends Replicator {<a name="line.437"></a>
 <span class="sourceLineNo">438</span><a name="line.438"></a>
-<span class="sourceLineNo">439</span>      public DummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.439"></a>
-<span class="sourceLineNo">440</span>        super(entries, ordinal);<a name="line.440"></a>
-<span class="sourceLineNo">441</span>        this.ordinal = ordinal;<a name="line.441"></a>
-<span class="sourceLineNo">442</span>      }<a name="line.442"></a>
-<span class="sourceLineNo">443</span><a name="line.443"></a>
-<span class="sourceLineNo">444</span>      @Override<a name="line.444"></a>
-<span class="sourceLineNo">445</span>      public Integer call() throws IOException {<a name="line.445"></a>
-<span class="sourceLineNo">446</span>        return ordinal;<a name="line.446"></a>
-<span class="sourceLineNo">447</span>      }<a name="line.447"></a>
-<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
-<span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>    protected class FailingDummyReplicator extends DummyReplicator {<a name="line.450"></a>
+<span class="sourceLineNo">439</span>      private int ordinal;<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>      public DummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>        super(entries, ordinal);<a name="line.442"></a>
+<span class="sourceLineNo">443</span>        this.ordinal = ordinal;<a name="line.443"></a>
+<span class="sourceLineNo">444</span>      }<a name="line.444"></a>
+<span class="sourceLineNo">445</span><a name="line.445"></a>
+<span class="sourceLineNo">446</span>      @Override<a name="line.446"></a>
+<span class="sourceLineNo">447</span>      public Integer call() throws IOException {<a name="line.447"></a>
+<span class="sourceLineNo">448</span>        return ordinal;<a name="line.448"></a>
+<span class="sourceLineNo">449</span>      }<a name="line.449"></a>
+<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
 <span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>      public FailingDummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.452"></a>
-<span class="sourceLineNo">453</span>        super(entries, ordinal);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>      }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>      @Override<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      public Integer call() throws IOException {<a name="line.457"></a>
-<span class="sourceLineNo">458</span>        throw new IOException("Sample Exception: Failed to replicate.");<a name="line.458"></a>
-<span class="sourceLineNo">459</span>      }<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    }<a name="line.460"></a>
-<span class="sourceLineNo">461</span>  }<a name="line.461"></a>
-<span class="sourceLineNo">462</span><a name="line.462"></a>
-<span class="sourceLineNo">463</span>  public static class ReplicationEndpointReturningFalse extends ReplicationEndpointForTest {<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    static int COUNT = 10;<a name="line.464"></a>
-<span class="sourceLineNo">465</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.465"></a>
-<span class="sourceLineNo">466</span>    static AtomicBoolean replicated = new AtomicBoolean(false);<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    @Override<a name="line.467"></a>
-<span class="sourceLineNo">468</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.468"></a>
-<span class="sourceLineNo">469</span>      try {<a name="line.469"></a>
-<span class="sourceLineNo">470</span>        // check row<a name="line.470"></a>
-<span class="sourceLineNo">471</span>        doAssert(row);<a name="line.471"></a>
-<span class="sourceLineNo">472</span>      } catch (Exception e) {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>        ex.set(e);<a name="line.473"></a>
-<span class="sourceLineNo">474</span>      }<a name="line.474"></a>
-<span class="sourceLineNo">475</span><a name="line.475"></a>
-<span class="sourceLineNo">476</span>      super.replicate(replicateContext);<a name="line.476"></a>
-<span class="sourceLineNo">477</span>      LOG.info("Replicated " + row + ", count=" + replicateCount.get());<a name="line.477"></a>
-<span class="sourceLineNo">478</span><a name="line.478"></a>
-<span class="sourceLineNo">479</span>      replicated.set(replicateCount.get() &gt; COUNT); // first 10 times, we return false<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      return replicated.get();<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    }<a name="line.481"></a>
-<span class="sourceLineNo">482</span>  }<a name="line.482"></a>
-<span class="sourceLineNo">483</span><a name="line.483"></a>
-<span class="sourceLineNo">484</span>  // return a WALEntry filter which only accepts "row", but not other rows<a name="line.484"></a>
-<span class="sourceLineNo">485</span>  public static class ReplicationEndpointWithWALEntryFilter extends ReplicationEndpointForTest {<a name="line.485"></a>
-<span class="sourceLineNo">486</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.486"></a>
-<span class="sourceLineNo">487</span><a name="line.487"></a>
-<span class="sourceLineNo">488</span>    @Override<a name="line.488"></a>
-<span class="sourceLineNo">489</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>      try {<a name="line.490"></a>
-<span class="sourceLineNo">491</span>        super.replicate(replicateContext);<a name="line.491"></a>
-<span class="sourceLineNo">492</span>        doAssert(row);<a name="line.492"></a>
-<span class="sourceLineNo">493</span>      } catch (Exception e) {<a name="line.493"></a>
-<span class="sourceLineNo">494</span>        ex.set(e);<a name="line.494"></a>
-<span class="sourceLineNo">495</span>      }<a name="line.495"></a>
-<span class="sourceLineNo">496</span>      return true;<a name="line.496"></a>
-<span class="sourceLineNo">497</span>    }<a name="line.497"></a>
-<span class="sourceLineNo">498</span><a name="line.498"></a>
-<span class="sourceLineNo">499</span>    @Override<a name="line.499"></a>
-<span class="sourceLineNo">500</span>    public WALEntryFilter getWALEntryfilter() {<a name="line.500"></a>
-<span class="sourceLineNo">501</span>      return new ChainWALEntryFilter(super.getWALEntryfilter(), new WALEntryFilter() {<a name="line.501"></a>
-<span class="sourceLineNo">502</span>        @Override<a name="line.502"></a>
-<span class="sourceLineNo">503</span>        public Entry filter(Entry entry) {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>          ArrayList&lt;Cell&gt; cells = entry.getEdit().getCells();<a name="line.504"></a>
-<span class="sourceLineNo">505</span>          int size = cells.size();<a name="line.505"></a>
-<span class="sourceLineNo">506</span>          for (int i = size-1; i &gt;= 0; i--) {<a name="line.506"></a>
-<span class="sourceLineNo">507</span>            Cell cell = cells.get(i);<a name="line.507"></a>
-<span class="sourceLineNo">508</span>            if (!Bytes.equals(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),<a name="line.508"></a>
-<span class="sourceLineNo">509</span>              row, 0, row.length)) {<a name="line.509"></a>
-<span class="sourceLineNo">510</span>              cells.remove(i);<a name="line.510"></a>
-<span class="sourceLineNo">511</span>            }<a name="line.511"></a>
-<span class="sourceLineNo">512</span>          }<a name="line.512"></a>
-<span class="sourceLineNo">513</span>          return entry;<a name="line.513"></a>
-<span class="sourceLineNo">514</span>        }<a name="line.514"></a>
-<span class="sourceLineNo">515</span>      });<a name="line.515"></a>
-<span class="sourceLineNo">516</span>    }<a name="line.516"></a>
-<span class="sourceLineNo">517</span>  }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>  public static class EverythingPassesWALEntryFilter implements WALEntryFilter {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>    private static boolean passedEntry = false;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    @Override<a name="line.521"></a>
-<span class="sourceLineNo">522</span>    public Entry filter(Entry entry) {<a name="line.522"></a>
-<span class="sourceLineNo">523</span>      passedEntry = true;<a name="line.523"></a>
-<span class="sourceLineNo">524</span>      return entry;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>    public static boolean hasPassedAnEntry(){<a name="line.527"></a>
-<span class="sourceLineNo">528</span>      return passedEntry;<a name="line.528"></a>
-<span class="sourceLineNo">529</span>    }<a name="line.529"></a>
-<span class="sourceLineNo">530</span>  }<a name="line.530"></a>
-<span class="sourceLineNo">531</span><a name="line.531"></a>
-<span class="sourceLineNo">532</span>  public static class EverythingPassesWALEntryFilterSubclass extends EverythingPassesWALEntryFilter {<a name="line.532"></a>
+<span class="sourceLineNo">452</span>    protected class FailingDummyReplicator extends DummyReplicator {<a name="line.452"></a>
+<span class="sourceLineNo">453</span><a name="line.453"></a>
+<span class="sourceLineNo">454</span>      public FailingDummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>        super(entries, ordinal);<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      }<a name="line.456"></a>
+<span class="sourceLineNo">457</span><a name="line.457"></a>
+<span class="sourceLineNo">458</span>      @Override<a name="line.458"></a>
+<span class="sourceLineNo">459</span>      public Integer call() throws IOException {<a name="line.459"></a>
+<span class="sourceLineNo">460</span>        throw new IOException("Sample Exception: Failed to replicate.");<a name="line.460"></a>
+<span class="sourceLineNo">461</span>      }<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    }<a name="line.462"></a>
+<span class="sourceLineNo">463</span>  }<a name="line.463"></a>
+<span class="sourceLineNo">464</span><a name="line.464"></a>
+<span class="sourceLineNo">465</span>  public static class ReplicationEndpointReturningFalse extends ReplicationEndpointForTest {<a name="line.465"></a>
+<span class="sourceLineNo">466</span>    static int COUNT = 10;<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.467"></a>
+<span class="sourceLineNo">468</span>    static AtomicBoolean replicated = new AtomicBoolean(false);<a name="line.468"></a>
+<span class="sourceLineNo">469</span>    @Override<a name="line.469"></a>
+<span class="sourceLineNo">470</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.470"></a>
+<span class="sourceLineNo">471</span>      try {<a name="line.471"></a>
+<span class="sourceLineNo">472</span>        // check row<a name="line.472"></a>
+<span class="sourceLineNo">473</span>        doAssert(row);<a name="line.473"></a>
+<span class="sourceLineNo">474</span>      } catch (Exception e) {<a name="line.474"></a>
+<span class="sourceLineNo">475</span>        ex.set(e);<a name="line.475"></a>
+<span class="sourceLineNo">476</span>      }<a name="line.476"></a>
+<span class="sourceLineNo">477</span><a name="line.477"></a>
+<span class="sourceLineNo">478</span>      super.replicate(replicateContext);<a name="line.478"></a>
+<span class="sourceLineNo">479</span>      LOG.info("Replicated " + row + ", count=" + replicateCount.get());<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>      replicated.set(replicateCount.get() &gt; COUNT); // first 10 times, we return false<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      return replicated.get();<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    }<a name="line.483"></a>
+<span class="sourceLineNo">484</span>  }<a name="line.484"></a>
+<span class="sourceLineNo">485</span><a name="line.485"></a>
+<span class="sourceLineNo">486</span>  // return a WALEntry filter which only accepts "row", but not other rows<a name="line.486"></a>
+<span class="sourceLineNo">487</span>  public static class ReplicationEndpointWithWALEntryFilter extends ReplicationEndpointForTest {<a name="line.487"></a>
+<span class="sourceLineNo">488</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.488"></a>
+<span class="sourceLineNo">489</span><a name="line.489"></a>
+<span class="sourceLineNo">490</span>    @Override<a name="line.490"></a>
+<span class="sourceLineNo">491</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.491"></a>
+<span class="sourceLineNo">492</span>      try {<a name="line.492"></a>
+<span class="sourceLineNo">493</span>        super.replicate(replicateContext);<a name="line.493"></a>
+<span class="sourceLineNo">494</span>        doAssert(row);<a name="line.494"></a>
+<span class="sourceLineNo">495</span>      } catch (Exception e) {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>        ex.set(e);<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      }<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return true;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    @Override<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    public WALEntryFilter getWALEntryfilter() {<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      return new ChainWALEntryFilter(super.getWALEntryfilter(), new WALEntryFilter() {<a name="line.503"></a>
+<span class="sourceLineNo">504</span>        @Override<a name="line.504"></a>
+<span class="sourceLineNo">505</span>        public Entry filter(Entry entry) {<a name="line.505"></a>
+<span class="sourceLineNo">506</span>          ArrayList&lt;Cell&gt; cells = entry.getEdit().getCells();<a name="line.506"></a>
+<span class="sourceLineNo">507</span>          int size = cells.size();<a name="line.507"></a>
+<span class="sourceLineNo">508</span>          for (int i = size-1; i &gt;= 0; i--) {<a name="line.508"></a>
+<span class="sourceLineNo">509</span>            Cell cell = cells.get(i);<a name="line.509"></a>
+<span class="sourceLineNo">510</span>            if (!Bytes.equals(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),<a name="line.510"></a>
+<span class="sourceLineNo">511</span>              row, 0, row.length)) {<a name="line.511"></a>
+<span class="sourceLineNo">512</span>              cells.remove(i);<a name="line.512"></a>
+<span class="sourceLineNo">513</span>            }<a name="line.513"></a>
+<span class="sourceLineNo">514</span>          }<a name="line.514"></a>
+<span class="sourceLineNo">515</span>          return entry;<a name="line.515"></a>
+<span class="sourceLineNo">516</span>        }<a name="line.516"></a>
+<span class="sourceLineNo">517</span>      });<a name="line.517"></a>
+<span class="sourceLineNo">518</span>    }<a name="line.518"></a>
+<span class="sourceLineNo">519</span>  }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>  public static class EverythingPassesWALEntryFilter implements WALEntryFilter {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    private static boolean passedEntry = false;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    @Override<a name="line.523"></a>
+<span class="sourceLineNo">524</span>    public Entry filter(Entry entry) {<a name="line.524"></a>
+<span class="sourceLineNo">525</span>      passedEntry = true;<a name="line.525"></a>
+<span class="sourceLineNo">526</span>      return entry;<a name="line.526"></a>
+<span class="sourceLineNo">527</span>    }<a name="line.527"></a>
+<span class="sourceLineNo">528</span><a name="line.528"></a>
+<span class="sourceLineNo">529</span>    public static boolean hasPassedAnEntry(){<a name="line.529"></a>
+<span class="sourceLineNo">530</span>      return passedEntry;<a name="line.530"></a>
+<span class="sourceLineNo">531</span>    }<a name="line.531"></a>
+<span class="sourceLineNo">532</span>  }<a name="line.532"></a>
 <span class="sourceLineNo">533</span><a name="line.533"></a>
-<span class="sourceLineNo">534</span>  }<a name="line.534"></a>
-<span class="sourceLineNo">535</span>}<a name="line.535"></a>
+<span class="sourceLineNo">534</span>  public static class EverythingPassesWALEntryFilterSubclass extends EverythingPassesWALEntryFilter {<a name="line.534"></a>
+<span class="sourceLineNo">535</span><a name="line.535"></a>
+<span class="sourceLineNo">536</span>  }<a name="line.536"></a>
+<span class="sourceLineNo">537</span>}<a name="line.537"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f63def63/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilterSubclass.html
----------------------------------------------------------------------
diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilterSubclass.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilterSubclass.html
index 465af29..65012da 100644
--- a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilterSubclass.html
+++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.EverythingPassesWALEntryFilterSubclass.html
@@ -318,229 +318,231 @@
 <span class="sourceLineNo">310</span>    MetricsSource source = new MetricsSource(id, singleSourceSource, globalSourceSource);<a name="line.310"></a>
 <span class="sourceLineNo">311</span>    String gaugeName = "gauge";<a name="line.311"></a>
 <span class="sourceLineNo">312</span>    String singleGaugeName = "source.id." + gaugeName;<a name="line.312"></a>
-<span class="sourceLineNo">313</span>    long delta = 1;<a name="line.313"></a>
-<span class="sourceLineNo">314</span>    String counterName = "counter";<a name="line.314"></a>
-<span class="sourceLineNo">315</span>    String singleCounterName = "source.id." + counterName;<a name="line.315"></a>
-<span class="sourceLineNo">316</span>    long count = 2;<a name="line.316"></a>
-<span class="sourceLineNo">317</span>    source.decGauge(gaugeName, delta);<a name="line.317"></a>
-<span class="sourceLineNo">318</span>    source.getMetricsContext();<a name="line.318"></a>
-<span class="sourceLineNo">319</span>    source.getMetricsDescription();<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    source.getMetricsJmxContext();<a name="line.320"></a>
-<span class="sourceLineNo">321</span>    source.getMetricsName();<a name="line.321"></a>
-<span class="sourceLineNo">322</span>    source.incCounters(counterName, count);<a name="line.322"></a>
-<span class="sourceLineNo">323</span>    source.incGauge(gaugeName, delta);<a name="line.323"></a>
-<span class="sourceLineNo">324</span>    source.init();<a name="line.324"></a>
-<span class="sourceLineNo">325</span>    source.removeMetric(gaugeName);<a name="line.325"></a>
-<span class="sourceLineNo">326</span>    source.setGauge(gaugeName, delta);<a name="line.326"></a>
-<span class="sourceLineNo">327</span>    source.updateHistogram(counterName, count);<a name="line.327"></a>
-<span class="sourceLineNo">328</span><a name="line.328"></a>
-<span class="sourceLineNo">329</span>    verify(singleRms).decGauge(singleGaugeName, delta);<a name="line.329"></a>
-<span class="sourceLineNo">330</span>    verify(globalRms).decGauge(gaugeName, delta);<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    verify(globalRms).getMetricsContext();<a name="line.331"></a>
-<span class="sourceLineNo">332</span>    verify(globalRms).getMetricsJmxContext();<a name="line.332"></a>
-<span class="sourceLineNo">333</span>    verify(globalRms).getMetricsName();<a name="line.333"></a>
-<span class="sourceLineNo">334</span>    verify(singleRms).incCounters(singleCounterName, count);<a name="line.334"></a>
-<span class="sourceLineNo">335</span>    verify(globalRms).incCounters(counterName, count);<a name="line.335"></a>
-<span class="sourceLineNo">336</span>    verify(singleRms).incGauge(singleGaugeName, delta);<a name="line.336"></a>
-<span class="sourceLineNo">337</span>    verify(globalRms).incGauge(gaugeName, delta);<a name="line.337"></a>
-<span class="sourceLineNo">338</span>    verify(globalRms).init();<a name="line.338"></a>
-<span class="sourceLineNo">339</span>    verify(singleRms).removeMetric(singleGaugeName);<a name="line.339"></a>
-<span class="sourceLineNo">340</span>    verify(globalRms).removeMetric(gaugeName);<a name="line.340"></a>
-<span class="sourceLineNo">341</span>    verify(singleRms).setGauge(singleGaugeName, delta);<a name="line.341"></a>
-<span class="sourceLineNo">342</span>    verify(globalRms).setGauge(gaugeName, delta);<a name="line.342"></a>
-<span class="sourceLineNo">343</span>    verify(singleRms).updateHistogram(singleCounterName, count);<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    verify(globalRms).updateHistogram(counterName, count);<a name="line.344"></a>
-<span class="sourceLineNo">345</span>  }<a name="line.345"></a>
-<span class="sourceLineNo">346</span><a name="line.346"></a>
-<span class="sourceLineNo">347</span>  private void doPut(byte[] row) throws IOException {<a name="line.347"></a>
-<span class="sourceLineNo">348</span>    try (Connection connection = ConnectionFactory.createConnection(conf1)) {<a name="line.348"></a>
-<span class="sourceLineNo">349</span>      doPut(connection, row);<a name="line.349"></a>
-<span class="sourceLineNo">350</span>    }<a name="line.350"></a>
-<span class="sourceLineNo">351</span>  }<a name="line.351"></a>
-<span class="sourceLineNo">352</span><a name="line.352"></a>
-<span class="sourceLineNo">353</span>  private void doPut(final Connection connection, final byte [] row) throws IOException {<a name="line.353"></a>
-<span class="sourceLineNo">354</span>    try (Table t = connection.getTable(tableName)) {<a name="line.354"></a>
-<span class="sourceLineNo">355</span>      Put put = new Put(row);<a name="line.355"></a>
-<span class="sourceLineNo">356</span>      put.addColumn(famName, row, row);<a name="line.356"></a>
-<span class="sourceLineNo">357</span>      t.put(put);<a name="line.357"></a>
-<span class="sourceLineNo">358</span>    }<a name="line.358"></a>
-<span class="sourceLineNo">359</span>  }<a name="line.359"></a>
-<span class="sourceLineNo">360</span><a name="line.360"></a>
-<span class="sourceLineNo">361</span>  private static void doAssert(byte[] row) throws Exception {<a name="line.361"></a>
-<span class="sourceLineNo">362</span>    if (ReplicationEndpointForTest.lastEntries == null) {<a name="line.362"></a>
-<span class="sourceLineNo">363</span>      return; // first call<a name="line.363"></a>
-<span class="sourceLineNo">364</span>    }<a name="line.364"></a>
-<span class="sourceLineNo">365</span>    Assert.assertEquals(1, ReplicationEndpointForTest.lastEntries.size());<a name="line.365"></a>
-<span class="sourceLineNo">366</span>    List&lt;Cell&gt; cells = ReplicationEndpointForTest.lastEntries.get(0).getEdit().getCells();<a name="line.366"></a>
-<span class="sourceLineNo">367</span>    Assert.assertEquals(1, cells.size());<a name="line.367"></a>
-<span class="sourceLineNo">368</span>    Assert.assertTrue(Bytes.equals(cells.get(0).getRowArray(), cells.get(0).getRowOffset(),<a name="line.368"></a>
-<span class="sourceLineNo">369</span>      cells.get(0).getRowLength(), row, 0, row.length));<a name="line.369"></a>
-<span class="sourceLineNo">370</span>  }<a name="line.370"></a>
-<span class="sourceLineNo">371</span><a name="line.371"></a>
-<span class="sourceLineNo">372</span>  public static class ReplicationEndpointForTest extends BaseReplicationEndpoint {<a name="line.372"></a>
-<span class="sourceLineNo">373</span>    static UUID uuid = UUID.randomUUID();<a name="line.373"></a>
-<span class="sourceLineNo">374</span>    static AtomicInteger contructedCount = new AtomicInteger();<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    static AtomicInteger startedCount = new AtomicInteger();<a name="line.375"></a>
-<span class="sourceLineNo">376</span>    static AtomicInteger stoppedCount = new AtomicInteger();<a name="line.376"></a>
-<span class="sourceLineNo">377</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.377"></a>
-<span class="sourceLineNo">378</span>    static volatile List&lt;Entry&gt; lastEntries = null;<a name="line.378"></a>
-<span class="sourceLineNo">379</span><a name="line.379"></a>
-<span class="sourceLineNo">380</span>    public ReplicationEndpointForTest() {<a name="line.380"></a>
-<span class="sourceLineNo">381</span>      contructedCount.incrementAndGet();<a name="line.381"></a>
-<span class="sourceLineNo">382</span>    }<a name="line.382"></a>
-<span class="sourceLineNo">383</span><a name="line.383"></a>
-<span class="sourceLineNo">384</span>    @Override<a name="line.384"></a>
-<span class="sourceLineNo">385</span>    public UUID getPeerUUID() {<a name="line.385"></a>
-<span class="sourceLineNo">386</span>      return uuid;<a name="line.386"></a>
-<span class="sourceLineNo">387</span>    }<a name="line.387"></a>
-<span class="sourceLineNo">388</span><a name="line.388"></a>
-<span class="sourceLineNo">389</span>    @Override<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.390"></a>
-<span class="sourceLineNo">391</span>      replicateCount.incrementAndGet();<a name="line.391"></a>
-<span class="sourceLineNo">392</span>      lastEntries = new ArrayList&lt;&gt;(replicateContext.entries);<a name="line.392"></a>
-<span class="sourceLineNo">393</span>      return true;<a name="line.393"></a>
-<span class="sourceLineNo">394</span>    }<a name="line.394"></a>
-<span class="sourceLineNo">395</span><a name="line.395"></a>
-<span class="sourceLineNo">396</span>    @Override<a name="line.396"></a>
-<span class="sourceLineNo">397</span>    protected void doStart() {<a name="line.397"></a>
-<span class="sourceLineNo">398</span>      startedCount.incrementAndGet();<a name="line.398"></a>
-<span class="sourceLineNo">399</span>      notifyStarted();<a name="line.399"></a>
-<span class="sourceLineNo">400</span>    }<a name="line.400"></a>
-<span class="sourceLineNo">401</span><a name="line.401"></a>
-<span class="sourceLineNo">402</span>    @Override<a name="line.402"></a>
-<span class="sourceLineNo">403</span>    protected void doStop() {<a name="line.403"></a>
-<span class="sourceLineNo">404</span>      stoppedCount.incrementAndGet();<a name="line.404"></a>
-<span class="sourceLineNo">405</span>      notifyStopped();<a name="line.405"></a>
-<span class="sourceLineNo">406</span>    }<a name="line.406"></a>
-<span class="sourceLineNo">407</span>  }<a name="line.407"></a>
-<span class="sourceLineNo">408</span><a name="line.408"></a>
-<span class="sourceLineNo">409</span>  public static class InterClusterReplicationEndpointForTest<a name="line.409"></a>
-<span class="sourceLineNo">410</span>      extends HBaseInterClusterReplicationEndpoint {<a name="line.410"></a>
-<span class="sourceLineNo">411</span><a name="line.411"></a>
-<span class="sourceLineNo">412</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.412"></a>
-<span class="sourceLineNo">413</span>    static boolean failedOnce;<a name="line.413"></a>
-<span class="sourceLineNo">414</span><a name="line.414"></a>
-<span class="sourceLineNo">415</span>    @Override<a name="line.415"></a>
-<span class="sourceLineNo">416</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.416"></a>
-<span class="sourceLineNo">417</span>      boolean success = super.replicate(replicateContext);<a name="line.417"></a>
-<span class="sourceLineNo">418</span>      if (success) {<a name="line.418"></a>
-<span class="sourceLineNo">419</span>        replicateCount.addAndGet(replicateContext.entries.size());<a name="line.419"></a>
-<span class="sourceLineNo">420</span>      }<a name="line.420"></a>
-<span class="sourceLineNo">421</span>      return success;<a name="line.421"></a>
-<span class="sourceLineNo">422</span>    }<a name="line.422"></a>
-<span class="sourceLineNo">423</span><a name="line.423"></a>
-<span class="sourceLineNo">424</span>    @Override<a name="line.424"></a>
-<span class="sourceLineNo">425</span>    protected Replicator createReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.425"></a>
-<span class="sourceLineNo">426</span>      // Fail only once, we don't want to slow down the test.<a name="line.426"></a>
-<span class="sourceLineNo">427</span>      if (failedOnce) {<a name="line.427"></a>
-<span class="sourceLineNo">428</span>        return new DummyReplicator(entries, ordinal);<a name="line.428"></a>
-<span class="sourceLineNo">429</span>      } else {<a name="line.429"></a>
-<span class="sourceLineNo">430</span>        failedOnce = true;<a name="line.430"></a>
-<span class="sourceLineNo">431</span>        return new FailingDummyReplicator(entries, ordinal);<a name="line.431"></a>
-<span class="sourceLineNo">432</span>      }<a name="line.432"></a>
-<span class="sourceLineNo">433</span>    }<a name="line.433"></a>
-<span class="sourceLineNo">434</span><a name="line.434"></a>
-<span class="sourceLineNo">435</span>    protected class DummyReplicator extends Replicator {<a name="line.435"></a>
+<span class="sourceLineNo">313</span>    String globalGaugeName = "source." + gaugeName;<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    long delta = 1;<a name="line.314"></a>
+<span class="sourceLineNo">315</span>    String counterName = "counter";<a name="line.315"></a>
+<span class="sourceLineNo">316</span>    String singleCounterName = "source.id." + counterName;<a name="line.316"></a>
+<span class="sourceLineNo">317</span>    String globalCounterName = "source." + counterName;<a name="line.317"></a>
+<span class="sourceLineNo">318</span>    long count = 2;<a name="line.318"></a>
+<span class="sourceLineNo">319</span>    source.decGauge(gaugeName, delta);<a name="line.319"></a>
+<span class="sourceLineNo">320</span>    source.getMetricsContext();<a name="line.320"></a>
+<span class="sourceLineNo">321</span>    source.getMetricsDescription();<a name="line.321"></a>
+<span class="sourceLineNo">322</span>    source.getMetricsJmxContext();<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    source.getMetricsName();<a name="line.323"></a>
+<span class="sourceLineNo">324</span>    source.incCounters(counterName, count);<a name="line.324"></a>
+<span class="sourceLineNo">325</span>    source.incGauge(gaugeName, delta);<a name="line.325"></a>
+<span class="sourceLineNo">326</span>    source.init();<a name="line.326"></a>
+<span class="sourceLineNo">327</span>    source.removeMetric(gaugeName);<a name="line.327"></a>
+<span class="sourceLineNo">328</span>    source.setGauge(gaugeName, delta);<a name="line.328"></a>
+<span class="sourceLineNo">329</span>    source.updateHistogram(counterName, count);<a name="line.329"></a>
+<span class="sourceLineNo">330</span><a name="line.330"></a>
+<span class="sourceLineNo">331</span>    verify(singleRms).decGauge(singleGaugeName, delta);<a name="line.331"></a>
+<span class="sourceLineNo">332</span>    verify(globalRms).decGauge(globalGaugeName, delta);<a name="line.332"></a>
+<span class="sourceLineNo">333</span>    verify(globalRms).getMetricsContext();<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    verify(globalRms).getMetricsJmxContext();<a name="line.334"></a>
+<span class="sourceLineNo">335</span>    verify(globalRms).getMetricsName();<a name="line.335"></a>
+<span class="sourceLineNo">336</span>    verify(singleRms).incCounters(singleCounterName, count);<a name="line.336"></a>
+<span class="sourceLineNo">337</span>    verify(globalRms).incCounters(globalCounterName, count);<a name="line.337"></a>
+<span class="sourceLineNo">338</span>    verify(singleRms).incGauge(singleGaugeName, delta);<a name="line.338"></a>
+<span class="sourceLineNo">339</span>    verify(globalRms).incGauge(globalGaugeName, delta);<a name="line.339"></a>
+<span class="sourceLineNo">340</span>    verify(globalRms).init();<a name="line.340"></a>
+<span class="sourceLineNo">341</span>    verify(singleRms).removeMetric(singleGaugeName);<a name="line.341"></a>
+<span class="sourceLineNo">342</span>    verify(globalRms).removeMetric(globalGaugeName);<a name="line.342"></a>
+<span class="sourceLineNo">343</span>    verify(singleRms).setGauge(singleGaugeName, delta);<a name="line.343"></a>
+<span class="sourceLineNo">344</span>    verify(globalRms).setGauge(globalGaugeName, delta);<a name="line.344"></a>
+<span class="sourceLineNo">345</span>    verify(singleRms).updateHistogram(singleCounterName, count);<a name="line.345"></a>
+<span class="sourceLineNo">346</span>    verify(globalRms).updateHistogram(globalCounterName, count);<a name="line.346"></a>
+<span class="sourceLineNo">347</span>  }<a name="line.347"></a>
+<span class="sourceLineNo">348</span><a name="line.348"></a>
+<span class="sourceLineNo">349</span>  private void doPut(byte[] row) throws IOException {<a name="line.349"></a>
+<span class="sourceLineNo">350</span>    try (Connection connection = ConnectionFactory.createConnection(conf1)) {<a name="line.350"></a>
+<span class="sourceLineNo">351</span>      doPut(connection, row);<a name="line.351"></a>
+<span class="sourceLineNo">352</span>    }<a name="line.352"></a>
+<span class="sourceLineNo">353</span>  }<a name="line.353"></a>
+<span class="sourceLineNo">354</span><a name="line.354"></a>
+<span class="sourceLineNo">355</span>  private void doPut(final Connection connection, final byte [] row) throws IOException {<a name="line.355"></a>
+<span class="sourceLineNo">356</span>    try (Table t = connection.getTable(tableName)) {<a name="line.356"></a>
+<span class="sourceLineNo">357</span>      Put put = new Put(row);<a name="line.357"></a>
+<span class="sourceLineNo">358</span>      put.addColumn(famName, row, row);<a name="line.358"></a>
+<span class="sourceLineNo">359</span>      t.put(put);<a name="line.359"></a>
+<span class="sourceLineNo">360</span>    }<a name="line.360"></a>
+<span class="sourceLineNo">361</span>  }<a name="line.361"></a>
+<span class="sourceLineNo">362</span><a name="line.362"></a>
+<span class="sourceLineNo">363</span>  private static void doAssert(byte[] row) throws Exception {<a name="line.363"></a>
+<span class="sourceLineNo">364</span>    if (ReplicationEndpointForTest.lastEntries == null) {<a name="line.364"></a>
+<span class="sourceLineNo">365</span>      return; // first call<a name="line.365"></a>
+<span class="sourceLineNo">366</span>    }<a name="line.366"></a>
+<span class="sourceLineNo">367</span>    Assert.assertEquals(1, ReplicationEndpointForTest.lastEntries.size());<a name="line.367"></a>
+<span class="sourceLineNo">368</span>    List&lt;Cell&gt; cells = ReplicationEndpointForTest.lastEntries.get(0).getEdit().getCells();<a name="line.368"></a>
+<span class="sourceLineNo">369</span>    Assert.assertEquals(1, cells.size());<a name="line.369"></a>
+<span class="sourceLineNo">370</span>    Assert.assertTrue(Bytes.equals(cells.get(0).getRowArray(), cells.get(0).getRowOffset(),<a name="line.370"></a>
+<span class="sourceLineNo">371</span>      cells.get(0).getRowLength(), row, 0, row.length));<a name="line.371"></a>
+<span class="sourceLineNo">372</span>  }<a name="line.372"></a>
+<span class="sourceLineNo">373</span><a name="line.373"></a>
+<span class="sourceLineNo">374</span>  public static class ReplicationEndpointForTest extends BaseReplicationEndpoint {<a name="line.374"></a>
+<span class="sourceLineNo">375</span>    static UUID uuid = UUID.randomUUID();<a name="line.375"></a>
+<span class="sourceLineNo">376</span>    static AtomicInteger contructedCount = new AtomicInteger();<a name="line.376"></a>
+<span class="sourceLineNo">377</span>    static AtomicInteger startedCount = new AtomicInteger();<a name="line.377"></a>
+<span class="sourceLineNo">378</span>    static AtomicInteger stoppedCount = new AtomicInteger();<a name="line.378"></a>
+<span class="sourceLineNo">379</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.379"></a>
+<span class="sourceLineNo">380</span>    static volatile List&lt;Entry&gt; lastEntries = null;<a name="line.380"></a>
+<span class="sourceLineNo">381</span><a name="line.381"></a>
+<span class="sourceLineNo">382</span>    public ReplicationEndpointForTest() {<a name="line.382"></a>
+<span class="sourceLineNo">383</span>      contructedCount.incrementAndGet();<a name="line.383"></a>
+<span class="sourceLineNo">384</span>    }<a name="line.384"></a>
+<span class="sourceLineNo">385</span><a name="line.385"></a>
+<span class="sourceLineNo">386</span>    @Override<a name="line.386"></a>
+<span class="sourceLineNo">387</span>    public UUID getPeerUUID() {<a name="line.387"></a>
+<span class="sourceLineNo">388</span>      return uuid;<a name="line.388"></a>
+<span class="sourceLineNo">389</span>    }<a name="line.389"></a>
+<span class="sourceLineNo">390</span><a name="line.390"></a>
+<span class="sourceLineNo">391</span>    @Override<a name="line.391"></a>
+<span class="sourceLineNo">392</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.392"></a>
+<span class="sourceLineNo">393</span>      replicateCount.incrementAndGet();<a name="line.393"></a>
+<span class="sourceLineNo">394</span>      lastEntries = new ArrayList&lt;&gt;(replicateContext.entries);<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      return true;<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    }<a name="line.396"></a>
+<span class="sourceLineNo">397</span><a name="line.397"></a>
+<span class="sourceLineNo">398</span>    @Override<a name="line.398"></a>
+<span class="sourceLineNo">399</span>    protected void doStart() {<a name="line.399"></a>
+<span class="sourceLineNo">400</span>      startedCount.incrementAndGet();<a name="line.400"></a>
+<span class="sourceLineNo">401</span>      notifyStarted();<a name="line.401"></a>
+<span class="sourceLineNo">402</span>    }<a name="line.402"></a>
+<span class="sourceLineNo">403</span><a name="line.403"></a>
+<span class="sourceLineNo">404</span>    @Override<a name="line.404"></a>
+<span class="sourceLineNo">405</span>    protected void doStop() {<a name="line.405"></a>
+<span class="sourceLineNo">406</span>      stoppedCount.incrementAndGet();<a name="line.406"></a>
+<span class="sourceLineNo">407</span>      notifyStopped();<a name="line.407"></a>
+<span class="sourceLineNo">408</span>    }<a name="line.408"></a>
+<span class="sourceLineNo">409</span>  }<a name="line.409"></a>
+<span class="sourceLineNo">410</span><a name="line.410"></a>
+<span class="sourceLineNo">411</span>  public static class InterClusterReplicationEndpointForTest<a name="line.411"></a>
+<span class="sourceLineNo">412</span>      extends HBaseInterClusterReplicationEndpoint {<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span>    static AtomicInteger replicateCount = new AtomicInteger();<a name="line.414"></a>
+<span class="sourceLineNo">415</span>    static boolean failedOnce;<a name="line.415"></a>
+<span class="sourceLineNo">416</span><a name="line.416"></a>
+<span class="sourceLineNo">417</span>    @Override<a name="line.417"></a>
+<span class="sourceLineNo">418</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.418"></a>
+<span class="sourceLineNo">419</span>      boolean success = super.replicate(replicateContext);<a name="line.419"></a>
+<span class="sourceLineNo">420</span>      if (success) {<a name="line.420"></a>
+<span class="sourceLineNo">421</span>        replicateCount.addAndGet(replicateContext.entries.size());<a name="line.421"></a>
+<span class="sourceLineNo">422</span>      }<a name="line.422"></a>
+<span class="sourceLineNo">423</span>      return success;<a name="line.423"></a>
+<span class="sourceLineNo">424</span>    }<a name="line.424"></a>
+<span class="sourceLineNo">425</span><a name="line.425"></a>
+<span class="sourceLineNo">426</span>    @Override<a name="line.426"></a>
+<span class="sourceLineNo">427</span>    protected Replicator createReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.427"></a>
+<span class="sourceLineNo">428</span>      // Fail only once, we don't want to slow down the test.<a name="line.428"></a>
+<span class="sourceLineNo">429</span>      if (failedOnce) {<a name="line.429"></a>
+<span class="sourceLineNo">430</span>        return new DummyReplicator(entries, ordinal);<a name="line.430"></a>
+<span class="sourceLineNo">431</span>      } else {<a name="line.431"></a>
+<span class="sourceLineNo">432</span>        failedOnce = true;<a name="line.432"></a>
+<span class="sourceLineNo">433</span>        return new FailingDummyReplicator(entries, ordinal);<a name="line.433"></a>
+<span class="sourceLineNo">434</span>      }<a name="line.434"></a>
+<span class="sourceLineNo">435</span>    }<a name="line.435"></a>
 <span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>      private int ordinal;<a name="line.437"></a>
+<span class="sourceLineNo">437</span>    protected class DummyReplicator extends Replicator {<a name="line.437"></a>
 <span class="sourceLineNo">438</span><a name="line.438"></a>
-<span class="sourceLineNo">439</span>      public DummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.439"></a>
-<span class="sourceLineNo">440</span>        super(entries, ordinal);<a name="line.440"></a>
-<span class="sourceLineNo">441</span>        this.ordinal = ordinal;<a name="line.441"></a>
-<span class="sourceLineNo">442</span>      }<a name="line.442"></a>
-<span class="sourceLineNo">443</span><a name="line.443"></a>
-<span class="sourceLineNo">444</span>      @Override<a name="line.444"></a>
-<span class="sourceLineNo">445</span>      public Integer call() throws IOException {<a name="line.445"></a>
-<span class="sourceLineNo">446</span>        return ordinal;<a name="line.446"></a>
-<span class="sourceLineNo">447</span>      }<a name="line.447"></a>
-<span class="sourceLineNo">448</span>    }<a name="line.448"></a>
-<span class="sourceLineNo">449</span><a name="line.449"></a>
-<span class="sourceLineNo">450</span>    protected class FailingDummyReplicator extends DummyReplicator {<a name="line.450"></a>
+<span class="sourceLineNo">439</span>      private int ordinal;<a name="line.439"></a>
+<span class="sourceLineNo">440</span><a name="line.440"></a>
+<span class="sourceLineNo">441</span>      public DummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.441"></a>
+<span class="sourceLineNo">442</span>        super(entries, ordinal);<a name="line.442"></a>
+<span class="sourceLineNo">443</span>        this.ordinal = ordinal;<a name="line.443"></a>
+<span class="sourceLineNo">444</span>      }<a name="line.444"></a>
+<span class="sourceLineNo">445</span><a name="line.445"></a>
+<span class="sourceLineNo">446</span>      @Override<a name="line.446"></a>
+<span class="sourceLineNo">447</span>      public Integer call() throws IOException {<a name="line.447"></a>
+<span class="sourceLineNo">448</span>        return ordinal;<a name="line.448"></a>
+<span class="sourceLineNo">449</span>      }<a name="line.449"></a>
+<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
 <span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>      public FailingDummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.452"></a>
-<span class="sourceLineNo">453</span>        super(entries, ordinal);<a name="line.453"></a>
-<span class="sourceLineNo">454</span>      }<a name="line.454"></a>
-<span class="sourceLineNo">455</span><a name="line.455"></a>
-<span class="sourceLineNo">456</span>      @Override<a name="line.456"></a>
-<span class="sourceLineNo">457</span>      public Integer call() throws IOException {<a name="line.457"></a>
-<span class="sourceLineNo">458</span>        throw new IOException("Sample Exception: Failed to replicate.");<a name="line.458"></a>
-<span class="sourceLineNo">459</span>      }<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    }<a name="line.460"></a>
-<span class="sourceLineNo">461</span>  }<a name="line.461"></a>
-<span class="sourceLineNo">462</span><a name="line.462"></a>
-<span class="sourceLineNo">463</span>  public static class ReplicationEndpointReturningFalse extends ReplicationEndpointForTest {<a name="line.463"></a>
-<span class="sourceLineNo">464</span>    static int COUNT = 10;<a name="line.464"></a>
-<span class="sourceLineNo">465</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.465"></a>
-<span class="sourceLineNo">466</span>    static AtomicBoolean replicated = new AtomicBoolean(false);<a name="line.466"></a>
-<span class="sourceLineNo">467</span>    @Override<a name="line.467"></a>
-<span class="sourceLineNo">468</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.468"></a>
-<span class="sourceLineNo">469</span>      try {<a name="line.469"></a>
-<span class="sourceLineNo">470</span>        // check row<a name="line.470"></a>
-<span class="sourceLineNo">471</span>        doAssert(row);<a name="line.471"></a>
-<span class="sourceLineNo">472</span>      } catch (Exception e) {<a name="line.472"></a>
-<span class="sourceLineNo">473</span>        ex.set(e);<a name="line.473"></a>
-<span class="sourceLineNo">474</span>      }<a name="line.474"></a>
-<span class="sourceLineNo">475</span><a name="line.475"></a>
-<span class="sourceLineNo">476</span>      super.replicate(replicateContext);<a name="line.476"></a>
-<span class="sourceLineNo">477</span>      LOG.info("Replicated " + row + ", count=" + replicateCount.get());<a name="line.477"></a>
-<span class="sourceLineNo">478</span><a name="line.478"></a>
-<span class="sourceLineNo">479</span>      replicated.set(replicateCount.get() &gt; COUNT); // first 10 times, we return false<a name="line.479"></a>
-<span class="sourceLineNo">480</span>      return replicated.get();<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    }<a name="line.481"></a>
-<span class="sourceLineNo">482</span>  }<a name="line.482"></a>
-<span class="sourceLineNo">483</span><a name="line.483"></a>
-<span class="sourceLineNo">484</span>  // return a WALEntry filter which only accepts "row", but not other rows<a name="line.484"></a>
-<span class="sourceLineNo">485</span>  public static class ReplicationEndpointWithWALEntryFilter extends ReplicationEndpointForTest {<a name="line.485"></a>
-<span class="sourceLineNo">486</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.486"></a>
-<span class="sourceLineNo">487</span><a name="line.487"></a>
-<span class="sourceLineNo">488</span>    @Override<a name="line.488"></a>
-<span class="sourceLineNo">489</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.489"></a>
-<span class="sourceLineNo">490</span>      try {<a name="line.490"></a>
-<span class="sourceLineNo">491</span>        super.replicate(replicateContext);<a name="line.491"></a>
-<span class="sourceLineNo">492</span>        doAssert(row);<a name="line.492"></a>
-<span class="sourceLineNo">493</span>      } catch (Exception e) {<a name="line.493"></a>
-<span class="sourceLineNo">494</span>        ex.set(e);<a name="line.494"></a>
-<span class="sourceLineNo">495</span>      }<a name="line.495"></a>
-<span class="sourceLineNo">496</span>      return true;<a name="line.496"></a>
-<span class="sourceLineNo">497</span>    }<a name="line.497"></a>
-<span class="sourceLineNo">498</span><a name="line.498"></a>
-<span class="sourceLineNo">499</span>    @Override<a name="line.499"></a>
-<span class="sourceLineNo">500</span>    public WALEntryFilter getWALEntryfilter() {<a name="line.500"></a>
-<span class="sourceLineNo">501</span>      return new ChainWALEntryFilter(super.getWALEntryfilter(), new WALEntryFilter() {<a name="line.501"></a>
-<span class="sourceLineNo">502</span>        @Override<a name="line.502"></a>
-<span class="sourceLineNo">503</span>        public Entry filter(Entry entry) {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>          ArrayList&lt;Cell&gt; cells = entry.getEdit().getCells();<a name="line.504"></a>
-<span class="sourceLineNo">505</span>          int size = cells.size();<a name="line.505"></a>
-<span class="sourceLineNo">506</span>          for (int i = size-1; i &gt;= 0; i--) {<a name="line.506"></a>
-<span class="sourceLineNo">507</span>            Cell cell = cells.get(i);<a name="line.507"></a>
-<span class="sourceLineNo">508</span>            if (!Bytes.equals(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),<a name="line.508"></a>
-<span class="sourceLineNo">509</span>              row, 0, row.length)) {<a name="line.509"></a>
-<span class="sourceLineNo">510</span>              cells.remove(i);<a name="line.510"></a>
-<span class="sourceLineNo">511</span>            }<a name="line.511"></a>
-<span class="sourceLineNo">512</span>          }<a name="line.512"></a>
-<span class="sourceLineNo">513</span>          return entry;<a name="line.513"></a>
-<span class="sourceLineNo">514</span>        }<a name="line.514"></a>
-<span class="sourceLineNo">515</span>      });<a name="line.515"></a>
-<span class="sourceLineNo">516</span>    }<a name="line.516"></a>
-<span class="sourceLineNo">517</span>  }<a name="line.517"></a>
-<span class="sourceLineNo">518</span><a name="line.518"></a>
-<span class="sourceLineNo">519</span>  public static class EverythingPassesWALEntryFilter implements WALEntryFilter {<a name="line.519"></a>
-<span class="sourceLineNo">520</span>    private static boolean passedEntry = false;<a name="line.520"></a>
-<span class="sourceLineNo">521</span>    @Override<a name="line.521"></a>
-<span class="sourceLineNo">522</span>    public Entry filter(Entry entry) {<a name="line.522"></a>
-<span class="sourceLineNo">523</span>      passedEntry = true;<a name="line.523"></a>
-<span class="sourceLineNo">524</span>      return entry;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>    }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>    public static boolean hasPassedAnEntry(){<a name="line.527"></a>
-<span class="sourceLineNo">528</span>      return passedEntry;<a name="line.528"></a>
-<span class="sourceLineNo">529</span>    }<a name="line.529"></a>
-<span class="sourceLineNo">530</span>  }<a name="line.530"></a>
-<span class="sourceLineNo">531</span><a name="line.531"></a>
-<span class="sourceLineNo">532</span>  public static class EverythingPassesWALEntryFilterSubclass extends EverythingPassesWALEntryFilter {<a name="line.532"></a>
+<span class="sourceLineNo">452</span>    protected class FailingDummyReplicator extends DummyReplicator {<a name="line.452"></a>
+<span class="sourceLineNo">453</span><a name="line.453"></a>
+<span class="sourceLineNo">454</span>      public FailingDummyReplicator(List&lt;Entry&gt; entries, int ordinal) {<a name="line.454"></a>
+<span class="sourceLineNo">455</span>        super(entries, ordinal);<a name="line.455"></a>
+<span class="sourceLineNo">456</span>      }<a name="line.456"></a>
+<span class="sourceLineNo">457</span><a name="line.457"></a>
+<span class="sourceLineNo">458</span>      @Override<a name="line.458"></a>
+<span class="sourceLineNo">459</span>      public Integer call() throws IOException {<a name="line.459"></a>
+<span class="sourceLineNo">460</span>        throw new IOException("Sample Exception: Failed to replicate.");<a name="line.460"></a>
+<span class="sourceLineNo">461</span>      }<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    }<a name="line.462"></a>
+<span class="sourceLineNo">463</span>  }<a name="line.463"></a>
+<span class="sourceLineNo">464</span><a name="line.464"></a>
+<span class="sourceLineNo">465</span>  public static class ReplicationEndpointReturningFalse extends ReplicationEndpointForTest {<a name="line.465"></a>
+<span class="sourceLineNo">466</span>    static int COUNT = 10;<a name="line.466"></a>
+<span class="sourceLineNo">467</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.467"></a>
+<span class="sourceLineNo">468</span>    static AtomicBoolean replicated = new AtomicBoolean(false);<a name="line.468"></a>
+<span class="sourceLineNo">469</span>    @Override<a name="line.469"></a>
+<span class="sourceLineNo">470</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.470"></a>
+<span class="sourceLineNo">471</span>      try {<a name="line.471"></a>
+<span class="sourceLineNo">472</span>        // check row<a name="line.472"></a>
+<span class="sourceLineNo">473</span>        doAssert(row);<a name="line.473"></a>
+<span class="sourceLineNo">474</span>      } catch (Exception e) {<a name="line.474"></a>
+<span class="sourceLineNo">475</span>        ex.set(e);<a name="line.475"></a>
+<span class="sourceLineNo">476</span>      }<a name="line.476"></a>
+<span class="sourceLineNo">477</span><a name="line.477"></a>
+<span class="sourceLineNo">478</span>      super.replicate(replicateContext);<a name="line.478"></a>
+<span class="sourceLineNo">479</span>      LOG.info("Replicated " + row + ", count=" + replicateCount.get());<a name="line.479"></a>
+<span class="sourceLineNo">480</span><a name="line.480"></a>
+<span class="sourceLineNo">481</span>      replicated.set(replicateCount.get() &gt; COUNT); // first 10 times, we return false<a name="line.481"></a>
+<span class="sourceLineNo">482</span>      return replicated.get();<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    }<a name="line.483"></a>
+<span class="sourceLineNo">484</span>  }<a name="line.484"></a>
+<span class="sourceLineNo">485</span><a name="line.485"></a>
+<span class="sourceLineNo">486</span>  // return a WALEntry filter which only accepts "row", but not other rows<a name="line.486"></a>
+<span class="sourceLineNo">487</span>  public static class ReplicationEndpointWithWALEntryFilter extends ReplicationEndpointForTest {<a name="line.487"></a>
+<span class="sourceLineNo">488</span>    static AtomicReference&lt;Exception&gt; ex = new AtomicReference&lt;&gt;(null);<a name="line.488"></a>
+<span class="sourceLineNo">489</span><a name="line.489"></a>
+<span class="sourceLineNo">490</span>    @Override<a name="line.490"></a>
+<span class="sourceLineNo">491</span>    public boolean replicate(ReplicateContext replicateContext) {<a name="line.491"></a>
+<span class="sourceLineNo">492</span>      try {<a name="line.492"></a>
+<span class="sourceLineNo">493</span>        super.replicate(replicateContext);<a name="line.493"></a>
+<span class="sourceLineNo">494</span>        doAssert(row);<a name="line.494"></a>
+<span class="sourceLineNo">495</span>      } catch (Exception e) {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>        ex.set(e);<a name="line.496"></a>
+<span class="sourceLineNo">497</span>      }<a name="line.497"></a>
+<span class="sourceLineNo">498</span>      return true;<a name="line.498"></a>
+<span class="sourceLineNo">499</span>    }<a name="line.499"></a>
+<span class="sourceLineNo">500</span><a name="line.500"></a>
+<span class="sourceLineNo">501</span>    @Override<a name="line.501"></a>
+<span class="sourceLineNo">502</span>    public WALEntryFilter getWALEntryfilter() {<a name="line.502"></a>
+<span class="sourceLineNo">503</span>      return new ChainWALEntryFilter(super.getWALEntryfilter(), new WALEntryFilter() {<a name="line.503"></a>
+<span class="sourceLineNo">504</span>        @Override<a name="line.504"></a>
+<span class="sourceLineNo">505</span>        public Entry filter(Entry entry) {<a name="line.505"></a>
+<span class="sourceLineNo">506</span>          ArrayList&lt;Cell&gt; cells = entry.getEdit().getCells();<a name="line.506"></a>
+<span class="sourceLineNo">507</span>          int size = cells.size();<a name="line.507"></a>
+<span class="sourceLineNo">508</span>          for (int i = size-1; i &gt;= 0; i--) {<a name="line.508"></a>
+<span class="sourceLineNo">509</span>            Cell cell = cells.get(i);<a name="line.509"></a>
+<span class="sourceLineNo">510</span>            if (!Bytes.equals(cell.getRowArray(), cell.getRowOffset(), cell.getRowLength(),<a name="line.510"></a>
+<span class="sourceLineNo">511</span>              row, 0, row.length)) {<a name="line.511"></a>
+<span class="sourceLineNo">512</span>              cells.remove(i);<a name="line.512"></a>
+<span class="sourceLineNo">513</span>            }<a name="line.513"></a>
+<span class="sourceLineNo">514</span>          }<a name="line.514"></a>
+<span class="sourceLineNo">515</span>          return entry;<a name="line.515"></a>
+<span class="sourceLineNo">516</span>        }<a name="line.516"></a>
+<span class="sourceLineNo">517</span>      });<a name="line.517"></a>
+<span class="sourceLineNo">518</span>    }<a name="line.518"></a>
+<span class="sourceLineNo">519</span>  }<a name="line.519"></a>
+<span class="sourceLineNo">520</span><a name="line.520"></a>
+<span class="sourceLineNo">521</span>  public static class EverythingPassesWALEntryFilter implements WALEntryFilter {<a name="line.521"></a>
+<span class="sourceLineNo">522</span>    private static boolean passedEntry = false;<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    @Override<a name="line.523"></a>
+<span class="sourceLineNo">524</span>    public Entry filter(Entry entry) {<a name="line.524"></a>
+<span class="sourceLineNo">525</span>      passedEntry = true;<a name="line.525"></a>
+<span class="sourceLineNo">526</span>      return entry;<a name="line.526"></a>
+<span class="sourceLineNo">527</span>    }<a name="line.527"></a>
+<span class="sourceLineNo">528</span><a name="line.528"></a>
+<span class="sourceLineNo">529</span>    public static boolean hasPassedAnEntry(){<a name="line.529"></a>
+<span class="sourceLineNo">530</span>      return passedEntry;<a name="line.530"></a>
+<span class="sourceLineNo">531</span>    }<a name="line.531"></a>
+<span class="sourceLineNo">532</span>  }<a name="line.532"></a>
 <span class="sourceLineNo">533</span><a name="line.533"></a>
-<span class="sourceLineNo">534</span>  }<a name="line.534"></a>
-<span class="sourceLineNo">535</span>}<a name="line.535"></a>
+<span class="sourceLineNo">534</span>  public static class EverythingPassesWALEntryFilterSubclass extends EverythingPassesWALEntryFilter {<a name="line.534"></a>
+<span class="sourceLineNo">535</span><a name="line.535"></a>
+<span class="sourceLineNo">536</span>  }<a name="line.536"></a>
+<span class="sourceLineNo">537</span>}<a name="line.537"></a>
 
 
 


Mime
View raw message