HBASE-6826. [WINDOWS] TestFromClientSide failures
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1407285 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
82ebcfd458
commit
eded9b6b1f
|
@ -75,6 +75,7 @@ import org.apache.hadoop.hbase.regionserver.HRegionServer;
|
||||||
import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
|
import org.apache.hadoop.hbase.regionserver.NoSuchColumnFamilyException;
|
||||||
import org.apache.hadoop.hbase.regionserver.Store;
|
import org.apache.hadoop.hbase.regionserver.Store;
|
||||||
import org.apache.hadoop.hbase.util.Bytes;
|
import org.apache.hadoop.hbase.util.Bytes;
|
||||||
|
import org.apache.hadoop.hbase.util.EnvironmentEdgeManager;
|
||||||
import org.apache.hadoop.hbase.util.Threads;
|
import org.apache.hadoop.hbase.util.Threads;
|
||||||
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
|
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
|
||||||
import org.apache.hadoop.io.DataInputBuffer;
|
import org.apache.hadoop.io.DataInputBuffer;
|
||||||
|
@ -4480,6 +4481,10 @@ public class TestFromClientSide {
|
||||||
threads.get(1).join();
|
threads.get(1).join();
|
||||||
assertEquals(2, pool.getPoolSize());
|
assertEquals(2, pool.getPoolSize());
|
||||||
|
|
||||||
|
//ensure that ThreadPoolExecutor knows that threads are finished.
|
||||||
|
while (pool.getCompletedTaskCount() < 2) {
|
||||||
|
Threads.sleep(1);
|
||||||
|
}
|
||||||
// Now let's simulate adding a RS meaning that we'll go up to three
|
// Now let's simulate adding a RS meaning that we'll go up to three
|
||||||
// concurrent threads. The pool should not grow larger than three.
|
// concurrent threads. The pool should not grow larger than three.
|
||||||
pool.submit(threads.get(2));
|
pool.submit(threads.get(2));
|
||||||
|
@ -4504,14 +4509,15 @@ public class TestFromClientSide {
|
||||||
HTable table = TEST_UTIL.createTable(tableName, new byte[][] { FAMILY },
|
HTable table = TEST_UTIL.createTable(tableName, new byte[][] { FAMILY },
|
||||||
conf, Integer.MAX_VALUE);
|
conf, Integer.MAX_VALUE);
|
||||||
table.setAutoFlush(true);
|
table.setAutoFlush(true);
|
||||||
Put put = new Put(ROW);
|
|
||||||
put.add(FAMILY, QUALIFIER, VALUE);
|
|
||||||
|
|
||||||
|
final long ts = EnvironmentEdgeManager.currentTimeMillis();
|
||||||
Get get = new Get(ROW);
|
Get get = new Get(ROW);
|
||||||
get.addColumn(FAMILY, QUALIFIER);
|
get.addColumn(FAMILY, QUALIFIER);
|
||||||
get.setMaxVersions();
|
get.setMaxVersions();
|
||||||
|
|
||||||
for (int versions = 1; versions <= numVersions; versions++) {
|
for (int versions = 1; versions <= numVersions; versions++) {
|
||||||
|
Put put = new Put(ROW);
|
||||||
|
put.add(FAMILY, QUALIFIER, ts + versions, VALUE);
|
||||||
table.put(put);
|
table.put(put);
|
||||||
|
|
||||||
Result result = table.get(get);
|
Result result = table.get(get);
|
||||||
|
@ -4541,14 +4547,15 @@ public class TestFromClientSide {
|
||||||
final HTable table = TEST_UTIL.createTable(tableName,
|
final HTable table = TEST_UTIL.createTable(tableName,
|
||||||
new byte[][] { FAMILY }, conf);
|
new byte[][] { FAMILY }, conf);
|
||||||
table.setAutoFlush(true);
|
table.setAutoFlush(true);
|
||||||
final Put put = new Put(ROW);
|
|
||||||
put.add(FAMILY, QUALIFIER, VALUE);
|
|
||||||
|
|
||||||
|
final long ts = EnvironmentEdgeManager.currentTimeMillis();
|
||||||
final Get get = new Get(ROW);
|
final Get get = new Get(ROW);
|
||||||
get.addColumn(FAMILY, QUALIFIER);
|
get.addColumn(FAMILY, QUALIFIER);
|
||||||
get.setMaxVersions();
|
get.setMaxVersions();
|
||||||
|
|
||||||
for (int versions = 1; versions <= numVersions; versions++) {
|
for (int versions = 1; versions <= numVersions; versions++) {
|
||||||
|
Put put = new Put(ROW);
|
||||||
|
put.add(FAMILY, QUALIFIER, ts + versions, VALUE);
|
||||||
table.put(put);
|
table.put(put);
|
||||||
|
|
||||||
Result result = table.get(get);
|
Result result = table.get(get);
|
||||||
|
@ -4573,6 +4580,8 @@ public class TestFromClientSide {
|
||||||
@Override
|
@Override
|
||||||
public Void call() {
|
public Void call() {
|
||||||
try {
|
try {
|
||||||
|
Put put = new Put(ROW);
|
||||||
|
put.add(FAMILY, QUALIFIER, ts + versionsCopy, VALUE);
|
||||||
table.put(put);
|
table.put(put);
|
||||||
|
|
||||||
Result result = table.get(get);
|
Result result = table.get(get);
|
||||||
|
|
Loading…
Reference in New Issue