HBASE-9082 A bunch of tests have client retries only but bulid boxes are contended and overloaded

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1508488 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-07-30 15:28:07 +00:00
parent eed805417a
commit 7c3882ca3c
5 changed files with 26 additions and 39 deletions

View File

@ -91,8 +91,6 @@ public class TestZooKeeperTableArchiveClient {
private static void setupConf(Configuration conf) {
// only compact with 3 files
conf.setInt("hbase.hstore.compaction.min", 3);
// drop the number of attempts for the hbase admin
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
}
@After
@ -125,7 +123,7 @@ public class TestZooKeeperTableArchiveClient {
/**
* Test turning on/off archiving
*/
@Test
@Test (timeout=300000)
public void testArchivingEnableDisable() throws Exception {
// 1. turn on hfile backups
LOG.debug("----Starting archiving");
@ -148,7 +146,7 @@ public class TestZooKeeperTableArchiveClient {
archivingClient.getArchivingEnabled(TABLE_NAME));
}
@Test
@Test (timeout=300000)
public void testArchivingOnSingleTable() throws Exception {
createArchiveDirectory();
FileSystem fs = UTIL.getTestFileSystem();
@ -192,7 +190,7 @@ public class TestZooKeeperTableArchiveClient {
* Test archiving/cleaning across multiple tables, where some are retained, and others aren't
* @throws Exception on failure
*/
@Test
@Test (timeout=300000)
public void testMultipleTables() throws Exception {
createArchiveDirectory();
String otherTable = "otherTable";
@ -415,4 +413,4 @@ public class TestZooKeeperTableArchiveClient {
// stop the cleaner
stop.stop("");
}
}
}

View File

@ -82,10 +82,7 @@ public class TestSnapshotCloneIndependence {
conf.setInt("hbase.hstore.compactionThreshold", 10);
// block writes if we get to 12 store files
conf.setInt("hbase.hstore.blockingStoreFiles", 12);
// drop the number of attempts for the hbase admin
conf.setInt("hbase.regionserver.msginterval", 100);
conf.setInt("hbase.client.pause", 250);
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
conf.setBoolean("hbase.master.enabletable.roundrobin", true);
// Avoid potentially aggressive splitting which would cause snapshot to fail
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
@ -122,7 +119,7 @@ public class TestSnapshotCloneIndependence {
* Verify that adding data to the cloned table will not affect the original, and vice-versa when
* it is taken as an online snapshot.
*/
@Test
@Test (timeout=300000)
public void testOnlineSnapshotAppendIndependent() throws Exception {
runTestSnapshotAppendIndependent(true);
}
@ -131,7 +128,7 @@ public class TestSnapshotCloneIndependence {
* Verify that adding data to the cloned table will not affect the original, and vice-versa when
* it is taken as an offline snapshot.
*/
@Test
@Test (timeout=300000)
public void testOfflineSnapshotAppendIndependent() throws Exception {
runTestSnapshotAppendIndependent(false);
}
@ -140,7 +137,7 @@ public class TestSnapshotCloneIndependence {
* Verify that adding metadata to the cloned table will not affect the original, and vice-versa
* when it is taken as an online snapshot.
*/
@Test
@Test (timeout=300000)
public void testOnlineSnapshotMetadataChangesIndependent() throws Exception {
runTestSnapshotMetadataChangesIndependent(true);
}
@ -149,7 +146,7 @@ public class TestSnapshotCloneIndependence {
* Verify that adding netadata to the cloned table will not affect the original, and vice-versa
* when is taken as an online snapshot.
*/
@Test
@Test (timeout=300000)
public void testOfflineSnapshotMetadataChangesIndependent() throws Exception {
runTestSnapshotMetadataChangesIndependent(false);
}
@ -158,7 +155,7 @@ public class TestSnapshotCloneIndependence {
* Verify that region operations, in this case splitting a region, are independent between the
* cloned table and the original.
*/
@Test
@Test (timeout=300000)
public void testOfflineSnapshotRegionOperationsIndependent() throws Exception {
runTestRegionOperationsIndependent(false);
}
@ -167,7 +164,7 @@ public class TestSnapshotCloneIndependence {
* Verify that region operations, in this case splitting a region, are independent between the
* cloned table and the original.
*/
@Test
@Test (timeout=300000)
public void testOnlineSnapshotRegionOperationsIndependent() throws Exception {
runTestRegionOperationsIndependent(true);
}

View File

@ -24,7 +24,6 @@ import java.io.IOException;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -85,8 +84,6 @@ public class TestSnapshotFromClient {
conf.setInt("hbase.hstore.compactionThreshold", 10);
// block writes if we get to 12 store files
conf.setInt("hbase.hstore.blockingStoreFiles", 12);
// drop the number of attempts for the hbase admin
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1);
// Enable snapshot
conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
@ -123,7 +120,7 @@ public class TestSnapshotFromClient {
* Test snapshotting not allowed .META. and -ROOT-
* @throws Exception
*/
@Test
@Test (timeout=300000)
public void testMetaTablesSnapshot() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
byte[] snapshotName = Bytes.toBytes("metaSnapshot");
@ -148,7 +145,7 @@ public class TestSnapshotFromClient {
*
* @throws Exception
*/
@Test
@Test (timeout=300000)
public void testSnapshotDeletionWithRegex() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
// make sure we don't fail on listing snapshots
@ -184,7 +181,7 @@ public class TestSnapshotFromClient {
* Test snapshotting a table that is offline
* @throws Exception
*/
@Test
@Test (timeout=300000)
public void testOfflineTableSnapshot() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
// make sure we don't fail on listing snapshots
@ -238,7 +235,7 @@ public class TestSnapshotFromClient {
SnapshotTestingUtils.assertNoSnapshots(admin);
}
@Test
@Test (timeout=300000)
public void testSnapshotFailsOnNonExistantTable() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
// make sure we don't fail on listing snapshots
@ -266,4 +263,4 @@ public class TestSnapshotFromClient {
LOG.info("Correctly failed to snapshot a non-existant table:" + e.getMessage());
}
}
}
}

View File

@ -110,10 +110,7 @@ public class TestSnapshotMetadata {
conf.setInt("hbase.hstore.compactionThreshold", 10);
// block writes if we get to 12 store files
conf.setInt("hbase.hstore.blockingStoreFiles", 12);
// drop the number of attempts for the hbase admin
conf.setInt("hbase.regionserver.msginterval", 100);
conf.setInt("hbase.client.pause", 250);
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
conf.setBoolean("hbase.master.enabletable.roundrobin", true);
// Avoid potentially aggressive splitting which would cause snapshot to fail
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
@ -175,7 +172,7 @@ public class TestSnapshotMetadata {
/**
* Verify that the describe for a cloned table matches the describe from the original.
*/
@Test
@Test (timeout=300000)
public void testDescribeMatchesAfterClone() throws Exception {
// Clone the original table
final String clonedTableNameAsString = "clone" + originalTableNameAsString;
@ -218,7 +215,7 @@ public class TestSnapshotMetadata {
/**
* Verify that the describe for a restored table matches the describe for one the original.
*/
@Test
@Test (timeout=300000)
public void testDescribeMatchesAfterRestore() throws Exception {
runRestoreWithAdditionalMetadata(false);
}
@ -227,7 +224,7 @@ public class TestSnapshotMetadata {
* Verify that if metadata changed after a snapshot was taken, that the old metadata replaces the
* new metadata during a restore
*/
@Test
@Test (timeout=300000)
public void testDescribeMatchesAfterMetadataChangeAndRestore() throws Exception {
runRestoreWithAdditionalMetadata(true);
}
@ -237,7 +234,7 @@ public class TestSnapshotMetadata {
* the restored table's original metadata
* @throws Exception
*/
@Test
@Test (timeout=300000)
public void testDescribeOnEmptyTableMatchesAfterMetadataChangeAndRestore() throws Exception {
runRestoreWithAdditionalMetadata(true, false);
}

View File

@ -113,8 +113,6 @@ public class TestFlushSnapshotFromClient {
conf.setInt("hbase.hstore.compactionThreshold", 10);
// block writes if we get to 12 store files
conf.setInt("hbase.hstore.blockingStoreFiles", 12);
// drop the number of attempts for the hbase admin
conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 3);
// Enable snapshot
conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true);
conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY,
@ -155,7 +153,7 @@ public class TestFlushSnapshotFromClient {
* Test simple flush snapshotting a table that is online
* @throws Exception
*/
@Test
@Test (timeout=300000)
public void testFlushTableSnapshot() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
// make sure we don't fail on listing snapshots
@ -199,7 +197,7 @@ public class TestFlushSnapshotFromClient {
admin, fs, false, new Path(rootDir, HConstants.HREGION_LOGDIR_NAME), snapshotServers);
}
@Test
@Test (timeout=300000)
public void testSnapshotFailsOnNonExistantTable() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
// make sure we don't fail on listing snapshots
@ -228,7 +226,7 @@ public class TestFlushSnapshotFromClient {
}
}
@Test(timeout = 60000)
@Test(timeout = 300000)
public void testAsyncFlushSnapshot() throws Exception {
HBaseAdmin admin = UTIL.getHBaseAdmin();
SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("asyncSnapshot")
@ -247,7 +245,7 @@ public class TestFlushSnapshotFromClient {
SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot);
}
@Test
@Test (timeout=300000)
public void testSnapshotStateAfterMerge() throws Exception {
int numRows = DEFAULT_NUM_ROWS;
HBaseAdmin admin = UTIL.getHBaseAdmin();
@ -300,7 +298,7 @@ public class TestFlushSnapshotFromClient {
UTIL.deleteTable(cloneBeforeMergeName);
}
@Test
@Test (timeout=300000)
public void testTakeSnapshotAfterMerge() throws Exception {
int numRows = DEFAULT_NUM_ROWS;
HBaseAdmin admin = UTIL.getHBaseAdmin();
@ -348,7 +346,7 @@ public class TestFlushSnapshotFromClient {
/**
* Basic end-to-end test of simple-flush-based snapshots
*/
@Test
@Test (timeout=300000)
public void testFlushCreateListDestroy() throws Exception {
LOG.debug("------- Starting Snapshot test -------------");
HBaseAdmin admin = UTIL.getHBaseAdmin();
@ -406,7 +404,7 @@ public class TestFlushSnapshotFromClient {
* same table currently running and that concurrent snapshots on different tables can both
* succeed concurretly.
*/
@Test(timeout=60000)
@Test(timeout=300000)
public void testConcurrentSnapshottingAttempts() throws IOException, InterruptedException {
final String STRING_TABLE2_NAME = STRING_TABLE_NAME + "2";
final byte[] TABLE2_NAME = Bytes.toBytes(STRING_TABLE2_NAME);