[03/14] hbase-site git commit: Published site at d957f0fa1926c13355c8cca01bbfd7133866e05d.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/4a007343/devapidocs/src-html/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.html -- diff --git a/devapidocs/src-html/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.html b/devapidocs/src-html/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.html index c4847bb..75b91e6 100644 --- a/devapidocs/src-html/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.html +++ b/devapidocs/src-html/org/apache/hadoop/hbase/zookeeper/ReadOnlyZKClient.html @@ -38,333 +38,334 @@ 030import java.util.concurrent.TimeUnit; 031import java.util.concurrent.atomic.AtomicBoolean; 032import org.apache.hadoop.conf.Configuration; -033import org.apache.hadoop.hbase.util.Threads; -034import org.apache.yetus.audience.InterfaceAudience; -035import org.apache.zookeeper.KeeperException; -036import org.apache.zookeeper.KeeperException.Code; -037import org.apache.zookeeper.ZooKeeper; -038import org.apache.zookeeper.data.Stat; -039import org.slf4j.Logger; -040import org.slf4j.LoggerFactory; -041 -042import org.apache.hbase.thirdparty.com.google.common.annotations.VisibleForTesting; -043 -044/** -045 * A very simple read only zookeeper implementation without watcher support. -046 */ -047@InterfaceAudience.Private -048public final class ReadOnlyZKClient implements Closeable { -049 -050 private static final Logger LOG = LoggerFactory.getLogger(ReadOnlyZKClient.class); -051 -052 public static final String RECOVERY_RETRY = "zookeeper.recovery.retry"; -053 -054 private static final int DEFAULT_RECOVERY_RETRY = 30; -055 -056 public static final String RECOVERY_RETRY_INTERVAL_MILLIS = -057 "zookeeper.recovery.retry.intervalmill"; -058 -059 private static final int DEFAULT_RECOVERY_RETRY_INTERVAL_MILLIS = 1000; -060 -061 public static final String KEEPALIVE_MILLIS = "zookeeper.keep-alive.time"; -062 -063 private static final int DEFAULT_KEEPALIVE_MILLIS = 6; -064 -065 private static final EnumSetFAIL_FAST_CODES = EnumSet.of(Code.NOAUTH, Code.AUTHFAILED); -066 -067 private final String connectString; -068 -069 private final int sessionTimeoutMs; -070 -071 private final int maxRetries; -072 -073 private final int retryIntervalMs; -074 -075 private final int keepAliveTimeMs; -076 -077 private static abstract class Task implements Delayed { -078 -079protected long time = System.nanoTime(); -080 -081public boolean needZk() { -082 return false; -083} -084 -085public void exec(ZooKeeper zk) { -086} -087 -088public void connectFailed(IOException e) { -089} -090 -091public void closed(IOException e) { -092} -093 -094@Override -095public int compareTo(Delayed o) { -096 Task that = (Task) o; -097 int c = Long.compare(time, that.time); -098 if (c != 0) { -099return c; -100 } -101 return Integer.compare(System.identityHashCode(this), System.identityHashCode(that)); -102} -103 -104@Override -105public long getDelay(TimeUnit unit) { -106 return unit.convert(time - System.nanoTime(), TimeUnit.NANOSECONDS); -107} -108 } -109 -110 private static final Task CLOSE = new Task() { -111 }; -112 -113 private final DelayQueue
tasks = new DelayQueue<>(); -114 -115 private final AtomicBoolean closed = new AtomicBoolean(false); -116 -117 @VisibleForTesting -118 ZooKeeper zookeeper; -119 -120 private int pendingRequests = 0; -121 -122 private String getId() { -123return String.format("0x%08x", System.identityHashCode(this)); -124 } -125 -126 public ReadOnlyZKClient(Configuration conf) { -127// We might use a different ZK for client access -128String clientZkQuorumServers = ZKConfig.getClientZKQuorumServersString(conf); -129if (clientZkQuorumServers != null) { -130 this.connectString = clientZkQuorumServers; -131} else { -132 this.connectString = ZKConfig.getZKQuorumServersString(conf); -133} -134this.sessionTimeoutMs = conf.getInt(ZK_SESSION_TIMEOUT, DEFAULT_ZK_SESSION_TIMEOUT); -135this.maxRetries = conf.getInt(RECOVERY_RETRY, DEFAULT_RECOVERY_RETRY); -136this.retryIntervalMs = -137 conf.getInt(RECOVERY_RETRY_INTERVAL_MILLIS, DEFAULT_RECOVERY_RETRY_INTERVAL_MILLIS); -138this.keepAliveTimeMs = conf.getInt(KEEPALIVE_MILLIS, DEFAULT_KEEPALIVE_MILLIS); -139LOG.debug( -140 "Connect {} to {} with session timeout={}ms, retries {}, " + -141"retry interval {}ms, keepAlive={}ms", -142 getId(), connectString, sessionTimeoutMs, maxRetries, retryIntervalMs, keepAliveTimeMs); -143Threads.setDaemonThreadRunning(new Thread(this::run), -144 "ReadOnlyZKClient-" + connectString + "@" + getId()); -145 } -146 -147 private abstract class ZKTask extends Task { -148 -149protected final String path; -150 -151private final CompletableFuture future; -152 -153private final S
[03/14] hbase-site git commit: Published site at b2bf22e209d2e87121986b35c5749b2b8ae45fa2.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f19aea37/testdevapidocs/src-html/org/apache/hadoop/hbase/filter/TestFilterList.TransformFilter.html -- diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/filter/TestFilterList.TransformFilter.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/filter/TestFilterList.TransformFilter.html index 0f6b219..62b2d81 100644 --- a/testdevapidocs/src-html/org/apache/hadoop/hbase/filter/TestFilterList.TransformFilter.html +++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/filter/TestFilterList.TransformFilter.html @@ -53,1035 +53,1085 @@ 045import org.junit.ClassRule; 046import org.junit.Test; 047import org.junit.experimental.categories.Category; -048 -049import org.apache.hbase.thirdparty.com.google.common.collect.Lists; -050 -051import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil; -052 -053@Category({FilterTests.class, SmallTests.class}) -054public class TestFilterList { -055 -056 @ClassRule -057 public static final HBaseClassTestRule CLASS_RULE = -058 HBaseClassTestRule.forClass(TestFilterList.class); -059 -060 static final int MAX_PAGES = 2; -061 -062 @Test -063 public void testAddFilter() throws Exception { -064Filter filter1 = new FirstKeyOnlyFilter(); -065Filter filter2 = new FirstKeyOnlyFilter(); -066 -067FilterList filterList = new FilterList(filter1, filter2); -068filterList.addFilter(new FirstKeyOnlyFilter()); -069 -070filterList = new FilterList(Arrays.asList(filter1, filter2)); -071filterList.addFilter(new FirstKeyOnlyFilter()); -072 -073filterList = new FilterList(Operator.MUST_PASS_ALL, filter1, filter2); -074filterList.addFilter(new FirstKeyOnlyFilter()); -075 -076filterList = new FilterList(Operator.MUST_PASS_ALL, Arrays.asList(filter1, filter2)); -077filterList.addFilter(new FirstKeyOnlyFilter()); -078 -079filterList.setReversed(false); -080FirstKeyOnlyFilter f = new FirstKeyOnlyFilter(); -081f.setReversed(true); -082try { -083 filterList.addFilter(f); -084 fail("The IllegalArgumentException should be thrown because the added filter is reversed"); -085} catch (IllegalArgumentException e) { -086} -087 -088 } -089 -090 @Test -091 public void testConstruction() { -092FirstKeyOnlyFilter f1 = new FirstKeyOnlyFilter(); -093FirstKeyOnlyFilter f2 = new FirstKeyOnlyFilter(); -094f1.setReversed(true); -095f2.setReversed(false); -096 -097try { -098 FilterList ff = new FilterList(f1, f2); -099 fail("The IllegalArgumentException should be thrown"); -100} catch (IllegalArgumentException e) { -101} -102 -103try { -104 FilterList ff = new FilterList(Arrays.asList(f1, f2)); -105 fail("The IllegalArgumentException should be thrown because the added filter is reversed"); -106} catch (IllegalArgumentException e) { -107} -108 -109try { -110 FilterList ff = new FilterList(FilterList.Operator.MUST_PASS_ALL, Arrays.asList(f1, f2)); -111 fail("The IllegalArgumentException should be thrown because the added filter is reversed"); -112} catch (IllegalArgumentException e) { -113} -114 -115try { -116 FilterList ff = new FilterList(FilterList.Operator.MUST_PASS_ALL, f1, f2); -117 fail("The IllegalArgumentException should be thrown because the added filter is reversed"); -118} catch (IllegalArgumentException e) { -119} -120 } -121 /** -122 * Test "must pass one" -123 * @throws Exception -124 */ -125 @Test -126 public void testMPONE() throws Exception { -127mpOneTest(getFilterMPONE()); -128 } -129 -130 private Filter getFilterMPONE() { -131Listfilters = new ArrayList<>(); -132filters.add(new PageFilter(MAX_PAGES)); -133filters.add(new WhileMatchFilter(new PrefixFilter(Bytes.toBytes("yyy"; -134Filter filterMPONE = -135 new FilterList(FilterList.Operator.MUST_PASS_ONE, filters); -136return filterMPONE; -137 } -138 -139 private void mpOneTest(Filter filterMPONE) throws Exception { -140/* Filter must do all below steps: -141 * -142 *
-151*/ -152filterMPONE.reset(); -153 assertFalse(filterMPONE.filterAllRemaining()); -154 -155/* Will pass both */ -156byte [] rowkey = Bytes.toBytes("y"); -- {@link #reset()}
-143 *- {@link #filterAllRemaining()} -> true indicates scan is over, false, keep going on.
-144 *- {@link #filterRowKey(byte[],int,int)} -> true to drop this row, -145 * if false, we will also call
-146 *- {@link #filterCell(org.apache.hadoop.hbase.KeyValue)} -> true to drop this cell
-147 *- {@link #filterRow()} -> last chance to drop entire row based on the sequence of -148 * filterValue() calls. Eg: filter a row if it doesn't contain a specified column. -149 *
-150 *
[03/14] hbase-site git commit: Published site at 7cdb52519236966a7cb6dff7fbd0609c87545f75.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5150e577/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.ParentProcedure.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.ParentProcedure.html b/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.ParentProcedure.html new file mode 100644 index 000..29cedaa --- /dev/null +++ b/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.ParentProcedure.html @@ -0,0 +1,125 @@ +http://www.w3.org/TR/html4/loose.dtd";> + + + + + +Uses of Class org.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.ParentProcedure (Apache HBase 3.0.0-SNAPSHOT Test API) + + + + + + + +JavaScript is disabled on your browser. + + + + + +Skip navigation links + + + + +Overview +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + + +Uses of Classorg.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.ParentProcedure + +No usage of org.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.ParentProcedure + + + + +Skip navigation links + + + + +Overview +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + +Copyright © 2007–2018 https://www.apache.org/";>The Apache Software Foundation. All rights reserved. + + http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5150e577/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.SubProcedure.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.SubProcedure.html b/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.SubProcedure.html new file mode 100644 index 000..0919d55 --- /dev/null +++ b/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.SubProcedure.html @@ -0,0 +1,125 @@ +http://www.w3.org/TR/html4/loose.dtd";> + + + + + +Uses of Class org.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.SubProcedure (Apache HBase 3.0.0-SNAPSHOT Test API) + + + + + + + +JavaScript is disabled on your browser. + + + + + +Skip navigation links + + + + +Overview +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + + +Uses of Classorg.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.SubProcedure + +No usage of org.apache.hadoop.hbase.procedure2.TestProcedureRollbackAIOOB.SubProcedure + + + + +Skip navigation links + + + + +Overview +Package +Class +Use +Tree +Deprecated +Index +Help + + + + +Prev +Next + + +Frames +No Frames + + +All Classes + + + + + + + + + +Copyright © 2007–2018 https://www.apache.org/";>The Apache Software Foundation. All rights reserved. + + http://git-wip-us.apache.org/repos/asf/hbase-site/blob/5150e577/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.html -- diff --git a/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.html b/testdevapidocs/org/apache/hadoop/hbase/procedure2/class-use/TestProcedureRollbackAIOOB.html new fi
[03/14] hbase-site git commit: Published site at .
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/fb491705/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html -- diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html index 5a1361f..8a84538 100644 --- a/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html +++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html @@ -354,3779 +354,3782 @@ 346 } 347} 348 -349// Every cluster is a local cluster until we start DFS -350// Note that conf could be null, but this.conf will not be -351String dataTestDir = getDataTestDir().toString(); -352 this.conf.set("fs.defaultFS","file:///"); -353this.conf.set(HConstants.HBASE_DIR, "file://" + dataTestDir); -354LOG.debug("Setting {} to {}", HConstants.HBASE_DIR, dataTestDir); -355 this.conf.setBoolean(CommonFSUtils.UNSAFE_STREAM_CAPABILITY_ENFORCE,false); -356 } -357 -358 /** -359 * @deprecated use {@link HBaseTestingUtility#HBaseTestingUtility()} instead -360 * @return a normal HBaseTestingUtility -361 */ -362 @Deprecated -363 public static HBaseTestingUtility createLocalHTU() { -364return new HBaseTestingUtility(); -365 } -366 -367 /** -368 * @deprecated use {@link HBaseTestingUtility#HBaseTestingUtility(Configuration)} instead -369 * @return a normal HBaseTestingUtility -370 */ -371 @Deprecated -372 public static HBaseTestingUtility createLocalHTU(Configuration c) { -373return new HBaseTestingUtility(c); -374 } -375 -376 /** -377 * Close both the region {@code r} and it's underlying WAL. For use in tests. -378 */ -379 public static void closeRegionAndWAL(final Region r) throws IOException { -380closeRegionAndWAL((HRegion)r); -381 } -382 -383 /** -384 * Close both the HRegion {@code r} and it's underlying WAL. For use in tests. -385 */ -386 public static void closeRegionAndWAL(final HRegion r) throws IOException { -387if (r == null) return; -388r.close(); -389if (r.getWAL() == null) return; -390r.getWAL().close(); -391 } -392 -393 /** -394 * Returns this classes's instance of {@link Configuration}. Be careful how -395 * you use the returned Configuration since {@link Connection} instances -396 * can be shared. The Map of Connections is keyed by the Configuration. If -397 * say, a Connection was being used against a cluster that had been shutdown, -398 * see {@link #shutdownMiniCluster()}, then the Connection will no longer -399 * be wholesome. Rather than use the return direct, its usually best to -400 * make a copy and use that. Do -401 *Configuration c = new Configuration(INSTANCE.getConfiguration());
-402 * @return Instance of Configuration. -403 */ -404 @Override -405 public Configuration getConfiguration() { -406return super.getConfiguration(); -407 } -408 -409 public void setHBaseCluster(HBaseCluster hbaseCluster) { -410this.hbaseCluster = hbaseCluster; -411 } -412 -413 /** -414 * Home our data in a dir under {@link #DEFAULT_BASE_TEST_DIRECTORY}. -415 * Give it a random name so can have many concurrent tests running if -416 * we need to. It needs to amend the {@link #TEST_DIRECTORY_KEY} -417 * System property, as it's what minidfscluster bases -418 * it data dir on. Moding a System property is not the way to do concurrent -419 * instances -- another instance could grab the temporary -420 * value unintentionally -- but not anything can do about it at moment; -421 * single instance only is how the minidfscluster works. -422 * -423 * We also create the underlying directory for -424 * hadoop.log.dir, mapreduce.cluster.local.dir and hadoop.tmp.dir, and set the values -425 * in the conf, and as a system property for hadoop.tmp.dir -426 * -427 * @return The calculated data test build directory, if newly-created. -428 */ -429 @Override -430 protected Path setupDataTestDir() { -431Path testPath = super.setupDataTestDir(); -432if (null == testPath) { -433 return null; -434} -435 -436createSubDirAndSystemProperty( -437 "hadoop.log.dir", -438 testPath, "hadoop-log-dir"); -439 -440// This is defaulted in core-default.xml to /tmp/hadoop-${user.name}, but -441// we want our own value to ensure uniqueness on the same machine -442createSubDirAndSystemProperty( -443 "hadoop.tmp.dir", -444 testPath, "hadoop-tmp-dir"); -445 -446// Read and modified in org.apache.hadoop.mapred.MiniMRCluster -447createSubDir( -448 "mapreduce.cluster.local.dir", -449 testPath, "mapred-local-dir"); -450 -451return testPath; -452 } +349// Save this for when setting default file:// brea
[03/14] hbase-site git commit: Published site at .
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/29385b7e/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html -- diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html index 0cec549..06b92ba 100644 --- a/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html +++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/HBaseTestingUtility.SeenRowTracker.html @@ -2518,1796 +2518,1811 @@ 2510return rows; 2511 } 2512 -2513 /** -2514 * Tool to get the reference to the region server object that holds the -2515 * region of the specified user table. -2516 * It first searches for the meta rows that contain the region of the -2517 * specified table, then gets the index of that RS, and finally retrieves -2518 * the RS's reference. -2519 * @param tableName user table to lookup in hbase:meta -2520 * @return region server that holds it, null if the row doesn't exist -2521 * @throws IOException -2522 * @throws InterruptedException -2523 */ -2524 public HRegionServer getRSForFirstRegionInTable(TableName tableName) -2525 throws IOException, InterruptedException { -2526ListmetaRows = getMetaTableRows(tableName); -2527if (metaRows == null || metaRows.isEmpty()) { -2528 return null; -2529} -2530LOG.debug("Found " + metaRows.size() + " rows for table " + -2531 tableName); -2532byte [] firstrow = metaRows.get(0); -2533LOG.debug("FirstRow=" + Bytes.toString(firstrow)); -2534long pause = getConfiguration().getLong(HConstants.HBASE_CLIENT_PAUSE, -2535 HConstants.DEFAULT_HBASE_CLIENT_PAUSE); -2536int numRetries = getConfiguration().getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, -2537 HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER); -2538RetryCounter retrier = new RetryCounter(numRetries+1, (int)pause, TimeUnit.MICROSECONDS); -2539while(retrier.shouldRetry()) { -2540 int index = getMiniHBaseCluster().getServerWith(firstrow); -2541 if (index != -1) { -2542return getMiniHBaseCluster().getRegionServerThreads().get(index).getRegionServer(); -2543 } -2544 // Came back -1. Region may not be online yet. Sleep a while. -2545 retrier.sleepUntilNextRetry(); -2546} -2547return null; -2548 } -2549 -2550 /** -2551 * Starts a MiniMRCluster
with a default number of -2552 *TaskTracker
's. -2553 * -2554 * @throws IOException When starting the cluster fails. -2555 */ -2556 public MiniMRCluster startMiniMapReduceCluster() throws IOException { -2557// Set a very high max-disk-utilization percentage to avoid the NodeManagers from failing. -2558conf.setIfUnset( -2559 "yarn.nodemanager.disk-health-checker.max-disk-utilization-per-disk-percentage", -2560"99.0"); -2561startMiniMapReduceCluster(2); -2562return mrCluster; +2513 /* +2514 * Find any other region server which is different from the one identified by parameter +2515 * @param rs +2516 * @return another region server +2517 */ +2518 public HRegionServer getOtherRegionServer(HRegionServer rs) { +2519for (JVMClusterUtil.RegionServerThread rst : +2520 getMiniHBaseCluster().getRegionServerThreads()) { +2521 if (!(rst.getRegionServer() == rs)) { +2522return rst.getRegionServer(); +2523 } +2524} +2525return null; +2526 } +2527 +2528 /** +2529 * Tool to get the reference to the region server object that holds the +2530 * region of the specified user table. +2531 * It first searches for the meta rows that contain the region of the +2532 * specified table, then gets the index of that RS, and finally retrieves +2533 * the RS's reference. +2534 * @param tableName user table to lookup in hbase:meta +2535 * @return region server that holds it, null if the row doesn't exist +2536 * @throws IOException +2537 * @throws InterruptedException +2538 */ +2539 public HRegionServer getRSForFirstRegionInTable(TableName tableName) +2540 throws IOException, InterruptedException { +2541ListmetaRows = getMetaTableRows(tableName); +2542if (metaRows == null || metaRows.isEmpty()) { +2543 return null; +2544} +2545LOG.debug("Found " + metaRows.size() + " rows for table " + +2546 tableName); +2547byte [] firstrow = metaRows.get(0); +2548LOG.debug("FirstRow=" + Bytes.toString(firstrow)); +2549long pause = getConfiguration().getLong(HConstants.HBASE_CLIENT_PAUSE, +2550 HConstants.DEFAULT_HBASE_CLIENT_PAUSE); +2551int numRetries = getConfiguration().getInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, +2552 HConstants.DEFAULT_HBASE_CLIENT_RETRIES_NUMBER); +2553RetryCounter
[03/14] hbase-site git commit: Published site at 82d554e3783372cc6b05489452c815b57c06f6cd.
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/f63def63/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.InterClusterReplicationEndpointForTest.html -- diff --git a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.InterClusterReplicationEndpointForTest.html b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.InterClusterReplicationEndpointForTest.html index 465af29..65012da 100644 --- a/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.InterClusterReplicationEndpointForTest.html +++ b/testdevapidocs/src-html/org/apache/hadoop/hbase/replication/TestReplicationEndpoint.InterClusterReplicationEndpointForTest.html @@ -318,229 +318,231 @@ 310MetricsSource source = new MetricsSource(id, singleSourceSource, globalSourceSource); 311String gaugeName = "gauge"; 312String singleGaugeName = "source.id." + gaugeName; -313long delta = 1; -314String counterName = "counter"; -315String singleCounterName = "source.id." + counterName; -316long count = 2; -317source.decGauge(gaugeName, delta); -318source.getMetricsContext(); -319source.getMetricsDescription(); -320source.getMetricsJmxContext(); -321source.getMetricsName(); -322source.incCounters(counterName, count); -323source.incGauge(gaugeName, delta); -324source.init(); -325source.removeMetric(gaugeName); -326source.setGauge(gaugeName, delta); -327source.updateHistogram(counterName, count); -328 -329 verify(singleRms).decGauge(singleGaugeName, delta); -330verify(globalRms).decGauge(gaugeName, delta); -331 verify(globalRms).getMetricsContext(); -332 verify(globalRms).getMetricsJmxContext(); -333verify(globalRms).getMetricsName(); -334 verify(singleRms).incCounters(singleCounterName, count); -335 verify(globalRms).incCounters(counterName, count); -336 verify(singleRms).incGauge(singleGaugeName, delta); -337verify(globalRms).incGauge(gaugeName, delta); -338verify(globalRms).init(); -339 verify(singleRms).removeMetric(singleGaugeName); -340 verify(globalRms).removeMetric(gaugeName); -341 verify(singleRms).setGauge(singleGaugeName, delta); -342verify(globalRms).setGauge(gaugeName, delta); -343 verify(singleRms).updateHistogram(singleCounterName, count); -344 verify(globalRms).updateHistogram(counterName, count); -345 } -346 -347 private void doPut(byte[] row) throws IOException { -348try (Connection connection = ConnectionFactory.createConnection(conf1)) { -349 doPut(connection, row); -350} -351 } -352 -353 private void doPut(final Connection connection, final byte [] row) throws IOException { -354try (Table t = connection.getTable(tableName)) { -355 Put put = new Put(row); -356 put.addColumn(famName, row, row); -357 t.put(put); -358} -359 } -360 -361 private static void doAssert(byte[] row) throws Exception { -362if (ReplicationEndpointForTest.lastEntries == null) { -363 return; // first call -364} -365Assert.assertEquals(1, ReplicationEndpointForTest.lastEntries.size()); -366Listcells = ReplicationEndpointForTest.lastEntries.get(0).getEdit().getCells(); -367Assert.assertEquals(1, cells.size()); -368 Assert.assertTrue(Bytes.equals(cells.get(0).getRowArray(), cells.get(0).getRowOffset(), -369 cells.get(0).getRowLength(), row, 0, row.length)); -370 } -371 -372 public static class ReplicationEndpointForTest extends BaseReplicationEndpoint { -373static UUID uuid = UUID.randomUUID(); -374static AtomicInteger contructedCount = new AtomicInteger(); -375static AtomicInteger startedCount = new AtomicInteger(); -376static AtomicInteger stoppedCount = new AtomicInteger(); -377static AtomicInteger replicateCount = new AtomicInteger(); -378static volatile List | lastEntries = null; -379 -380public ReplicationEndpointForTest() { -381 contructedCount.incrementAndGet(); -382} -383 -384@Override -385public UUID getPeerUUID() { -386 return uuid; -387} -388 -389@Override -390public boolean replicate(ReplicateContext replicateContext) { -391 replicateCount.incrementAndGet(); -392 lastEntries = new ArrayList<>(replicateContext.entries); -393 return true; -394} -395 -396@Override -397protected void doStart() { -398 startedCount.incrementAndGet(); -399 notifyStarted(); -400} -401 -402@Override -403protected void doStop() { -404 stoppedCount.incrementAndGet(); -405 notifyStopped(); -406} -407 } -408 -409 public static class InterClusterReplicationEndpointForTest -410 extends HBaseInterClusterReplicationEndpoint { -411 -412static AtomicInteger replicateCount = new AtomicInteger(); -413static