Author: liyin Date: Fri Mar 14 18:09:57 2014 New Revision: 1577643 URL: http://svn.apache.org/r1577643 Log: [private] Tag some unstable cases
Author: daviddeng Summary: According to http://ci-builds.fb.com/job/hadoop_cheetah_hbase_trunk/1444/ Test Plan: Jekkins Reviewers: gauravm, manukranthk, liyintang, fan, aaiyer Reviewed By: liyintang CC: hbase-eng@ Differential Revision: https://phabricator.fb.com/D1220890 Task ID: 3789093 Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/UnstableTestSuite.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestServerConfigFromClient.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestLogSplitOnMasterFailover.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRSLivenessOnMasterFailover.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionStateOnMasterFailure.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestThriftMetrics.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestProcessBasedCluster.java Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/UnstableTestSuite.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/UnstableTestSuite.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/UnstableTestSuite.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/UnstableTestSuite.java Fri Mar 14 18:09:57 2014 @@ -19,12 +19,29 @@ */ package org.apache.hadoop.hbase; +import org.apache.hadoop.hbase.client.TestScannerTimeout; +import org.apache.hadoop.hbase.client.TestServerConfigFromClient; +import org.apache.hadoop.hbase.mapreduce.TestHFileOutputFormat; +import org.apache.hadoop.hbase.master.TestLogSplitOnMasterFailover; +import org.apache.hadoop.hbase.master.TestRSLivenessOnMasterFailover; +import org.apache.hadoop.hbase.master.TestRegionPlacement; +import org.apache.hadoop.hbase.master.TestRegionStateOnMasterFailure; import org.apache.hadoop.hbase.regionserver.TestHRegionCloseRetry; +import org.apache.hadoop.hbase.regionserver.metrics.TestThriftMetrics; +import org.apache.hadoop.hbase.regionserver.wal.TestLogRolling; +import org.apache.hadoop.hbase.regionserver.wal.TestWALReplay; +import org.apache.hadoop.hbase.replication.regionserver.TestReplicationSink; +import org.apache.hadoop.hbase.util.TestProcessBasedCluster; import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses({ TestHRegionCloseRetry.class }) +@SuiteClasses({ TestHRegionCloseRetry.class, TestReplicationSink.class, + TestLogRolling.class, TestHFileOutputFormat.class, + TestProcessBasedCluster.class, TestRegionStateOnMasterFailure.class, + TestScannerTimeout.class, TestWALReplay.class, TestThriftMetrics.class, + TestRegionPlacement.class, TestServerConfigFromClient.class, + TestRSLivenessOnMasterFailover.class, TestLogSplitOnMasterFailover.class }) public class UnstableTestSuite { } Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java Fri Mar 14 18:09:57 2014 @@ -28,14 +28,18 @@ import org.apache.hadoop.conf.Configurat import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; /** * Test various scanner timeout issues. */ +@RunWith(TagRunner.class) public class TestScannerTimeout { private final static HBaseTestingUtility @@ -84,6 +88,8 @@ public class TestScannerTimeout { * Test that we do get a ScannerTimeoutException * @throws Exception */ + // Marked as unstable and recored in #3921333 + @TestTag({ "unstable" }) @Test public void test2481() throws Exception { Scan scan = new Scan(); Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestServerConfigFromClient.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestServerConfigFromClient.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestServerConfigFromClient.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/client/TestServerConfigFromClient.java Fri Mar 14 18:09:57 2014 @@ -20,18 +20,23 @@ package org.apache.hadoop.hbase.client; import static org.junit.Assert.assertEquals; + import java.io.IOException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; +@RunWith(TagRunner.class) public class TestServerConfigFromClient { final Log LOG = LogFactory.getLog(getClass()); private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); @@ -71,6 +76,8 @@ public class TestServerConfigFromClient // Nothing to do. } + // Marked as unstable and recorded in #3922005 + @TestTag({ "unstable" }) @Test public void testReadConfig() throws IOException { final byte [] CONTENTS_FAMILY = Bytes.toBytes("contents"); Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHFileOutputFormat.java Fri Mar 14 18:09:57 2014 @@ -1,4 +1,4 @@ -/** +/** * Copyright 2009 The Apache Software Foundation * * Licensed to the Apache Software Foundation (ASF) under one @@ -35,7 +35,6 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Random; -import com.google.common.collect.Lists; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -73,6 +72,8 @@ import org.apache.hadoop.hbase.regionser import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Pair; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; @@ -86,8 +87,11 @@ import org.apache.hadoop.mapreduce.TaskA import org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.Mockito; +import com.google.common.collect.Lists; + /** * Simple test for {@link KeyValueSortReducer} and {@link HFileOutputFormat}. * Sets up and runs a mapreduce job that writes hfile output. @@ -95,6 +99,7 @@ import org.mockito.Mockito; * emits keys and values like those of {@link PerformanceEvaluation}. Makes * as many splits as "mapred.map.tasks" maps. */ +@RunWith(TagRunner.class) public class TestHFileOutputFormat { private final static int ROWSPERSPLIT = 1024; @@ -105,9 +110,9 @@ public class TestHFileOutputFormat { private static final byte[] TABLE_NAME = Bytes.toBytes("TestTable"); private static final String oldValue = "valAAAAA"; private static final String newValue = "valBBBBB"; - + private HBaseTestingUtility util = new HBaseTestingUtility(); - + private static Log LOG = LogFactory.getLog(TestHFileOutputFormat.class); /** @@ -116,7 +121,7 @@ public class TestHFileOutputFormat { static class RandomKVGeneratingMapper extends Mapper<NullWritable, NullWritable, ImmutableBytesWritable, KeyValue> { - + private int keyLength; private static final int KEYLEN_DEFAULT=10; private static final String KEYLEN_CONF="randomkv.key.length"; @@ -124,12 +129,12 @@ public class TestHFileOutputFormat { private int valLength; private static final int VALLEN_DEFAULT=10; private static final String VALLEN_CONF="randomkv.val.length"; - + @Override protected void setup(Context context) throws IOException, InterruptedException { super.setup(context); - + Configuration conf = context.getConfiguration(); keyLength = conf.getInt(KEYLEN_CONF, KEYLEN_DEFAULT); valLength = conf.getInt(VALLEN_CONF, VALLEN_DEFAULT); @@ -144,7 +149,7 @@ public class TestHFileOutputFormat { { byte keyBytes[] = new byte[keyLength]; byte valBytes[] = new byte[valLength]; - + int taskId = context.getTaskAttemptID().getTaskID().getId(); assert taskId < Byte.MAX_VALUE : "Unit tests dont support > 127 tasks!"; @@ -178,9 +183,9 @@ public class TestHFileOutputFormat { Mapper<NullWritable, NullWritable, ImmutableBytesWritable, RowMutation> { @Override protected void map( - NullWritable n1, NullWritable n2, - Mapper<NullWritable, NullWritable, - ImmutableBytesWritable, RowMutation>.Context context) + NullWritable n1, NullWritable n2, + Mapper<NullWritable, NullWritable, + ImmutableBytesWritable, RowMutation>.Context context) throws IOException ,InterruptedException { byte[] row = Bytes.toBytes("row1"); @@ -296,33 +301,33 @@ public class TestHFileOutputFormat { * @throws Exception on job, sorting, IO or fs errors */ @Test - public void testRowSortReducer() + public void testRowSortReducer() throws Exception { Configuration conf = new Configuration(this.util.getConfiguration()); conf.setInt("io.sort.mb", 20); conf.setInt("mapred.map.tasks", 1); Path dir = util.getTestDir("testRowSortReducer"); - + try { Job job = new Job(conf); - + job.setInputFormatClass(NMapInputFormat.class); job.setOutputFormatClass(HFileOutputFormat.class); - + job.setNumReduceTasks(1); job.setMapperClass(RowSorterMapper.class); // local job.setReducerClass(RowMutationSortReducer.class); - + job.setOutputKeyClass(ImmutableBytesWritable.class); job.setOutputValueClass(KeyValue.class); - + job.setMapOutputKeyClass(ImmutableBytesWritable.class); - job.setMapOutputValueClass(RowMutation.class); + job.setMapOutputValueClass(RowMutation.class); FileOutputFormat.setOutputPath(job, dir); - + assertTrue(job.waitForCompletion(false)); FileSystem fs = dir.getFileSystem(conf); @@ -340,12 +345,12 @@ public class TestHFileOutputFormat { scanner.seekTo(); int index = 0; - + // check things for info-A if (Bytes.toString(TestHFileOutputFormat.FAMILIES[0]).equals(cf)) { do { ++index; - + KeyValue kv = scanner.getKeyValue(); long ts = kv.getTimestamp(); @@ -437,7 +442,7 @@ public class TestHFileOutputFormat { dir.getFileSystem(conf).delete(dir, true); } } - + /** * Test that {@link HFileOutputFormat} RecordWriter amends timestamps if * passed a keyvalue whose timestamp is {@link HConstants#LATEST_TIMESTAMP}. @@ -491,22 +496,22 @@ public class TestHFileOutputFormat { Configuration conf = util.getConfiguration(); Path testDir = util.getTestDir("testWritingPEData"); FileSystem fs = testDir.getFileSystem(conf); - + // Set down this value or we OOME in eclipse. conf.setInt("io.sort.mb", 20); // Write a few files. conf.setLong("hbase.hregion.max.filesize", 64 * 1024); - + Job job = new Job(conf, "testWritingPEData"); setupRandomGeneratorMapper(job); // This partitioner doesn't work well for number keys but using it anyways // just to demonstrate how to configure it. byte[] startKey = new byte[RandomKVGeneratingMapper.KEYLEN_DEFAULT]; byte[] endKey = new byte[RandomKVGeneratingMapper.KEYLEN_DEFAULT]; - + Arrays.fill(startKey, (byte)0); Arrays.fill(endKey, (byte)0xff); - + job.setPartitionerClass(SimpleTotalOrderPartitioner.class); // Set start and end rows for partitioner. SimpleTotalOrderPartitioner.setStartKey(job.getConfiguration(), startKey); @@ -514,13 +519,13 @@ public class TestHFileOutputFormat { job.setReducerClass(KeyValueSortReducer.class); job.setOutputFormatClass(HFileOutputFormat.class); job.setNumReduceTasks(4); - + FileOutputFormat.setOutputPath(job, testDir); assertTrue(job.waitForCompletion(false)); FileStatus [] files = fs.listStatus(testDir); assertTrue(files.length > 0); } - + @Test public void testJobConfiguration() throws Exception { Job job = new Job(); @@ -540,26 +545,26 @@ public class TestHFileOutputFormat { } return ret; } - + @Test public void testMRIncrementalLoad() throws Exception { LOG.info("\nStarting test testMRIncrementalLoad\n"); doIncrementalLoadTest(false); } - + @Test public void testMRIncrementalLoadWithSplit() throws Exception { LOG.info("\nStarting test testMRIncrementalLoadWithSplit\n"); doIncrementalLoadTest(true); } - + private void doIncrementalLoadTest( boolean shouldChangeRegions) throws Exception { util = new HBaseTestingUtility(); Configuration conf = util.getConfiguration(); Path testDir = util.getTestDir("testLocalMRIncrementalLoad"); byte[][] startKeys = generateRandomStartKeys(5); - + try { util.startMiniCluster(); HBaseAdmin admin = new HBaseAdmin(conf); @@ -606,10 +611,10 @@ public class TestHFileOutputFormat { LOG.info("Waiting for new region assignment to happen"); } } - + // Perform the actual load new LoadIncrementalHFiles(conf).doBulkLoad(testDir, table); - + // Ensure data shows up int expectedRows = conf.getInt("mapred.map.tasks", 1) * ROWSPERSPLIT; assertEquals("LoadIncrementalHFiles should put expected data in table", @@ -626,16 +631,16 @@ public class TestHFileOutputFormat { } results.close(); String tableDigestBefore = util.checksumRows(table); - + // Cause regions to reopen admin.disableTable(TABLE_NAME); while (table.getRegionsInfo().size() != 0) { Thread.sleep(1000); - LOG.info("Waiting for table to disable"); + LOG.info("Waiting for table to disable"); } admin.enableTable(TABLE_NAME); util.waitTableAvailable(TABLE_NAME, 30000); - + assertEquals("Data should remain after reopening of regions", tableDigestBefore, util.checksumRows(table)); } finally { @@ -643,7 +648,7 @@ public class TestHFileOutputFormat { util.shutdownMiniCluster(); } } - + private void runIncrementalPELoad( Configuration conf, HTable table, Path outDir) throws Exception { @@ -651,10 +656,10 @@ public class TestHFileOutputFormat { setupRandomGeneratorMapper(job); HFileOutputFormat.configureIncrementalLoad(job, table); FileOutputFormat.setOutputPath(job, outDir); - + assertEquals(table.getRegionsInfo().size(), job.getNumReduceTasks()); - + assertTrue(job.waitForCompletion(true)); } @@ -711,7 +716,7 @@ public class TestHFileOutputFormat { * Test for * {@link HFileOutputFormat#createFamilyCompressionMap(Configuration)}. Tests * that the compression map is correctly deserialized from configuration - * + * * @throws IOException */ @Test @@ -777,7 +782,7 @@ public class TestHFileOutputFormat { } return familyToCompression; } - + /** * Test that {@link HFileOutputFormat} RecordWriter uses compression settings * from the column family descriptor @@ -827,7 +832,7 @@ public class TestHFileOutputFormat { // Make sure that a directory was created for every CF FileSystem fileSystem = dir.getFileSystem(conf); - + // commit so that the filesystem has one directory per column family hof.getOutputCommitter(context).commitTask(context); for (byte[] family : FAMILIES) { @@ -983,7 +988,7 @@ public class TestHFileOutputFormat { } } - private void setupColumnFamiliesEncodingType(HTable table, + private void setupColumnFamiliesEncodingType(HTable table, Map<String, DataBlockEncoding> familyToEncoding) throws IOException { HTableDescriptor mockTableDesc = new HTableDescriptor(); for (Entry<String, DataBlockEncoding> entry : familyToEncoding.entrySet()) { @@ -1003,7 +1008,7 @@ public class TestHFileOutputFormat { } Mockito.doReturn(mockTableDesc).when(table).getTableDescriptor(); } - + /** * Test that {@link HFileOutputFormat} RecordWriter uses encoding settings * from the column family descriptor @@ -1065,13 +1070,13 @@ public class TestHFileOutputFormat { // verify that the Encoding type on this file matches the // configured Encoding type. Path dataFilePath = fileSystem.listStatus(f.getPath())[0].getPath(); - + StoreFile.Reader reader = new StoreFile.Reader(fileSystem, dataFilePath, new CacheConfig(conf), null); Map<byte[], byte[]> metadataMap = reader.loadFileInfo(); assertTrue("timeRange is not set", metadataMap.get(StoreFile.TIMERANGE_KEY) != null); - assertEquals("Incorrect Encoding Type used for column family " + assertEquals("Incorrect Encoding Type used for column family " + familyStr + "(reader: " + reader + ")", configuredEncoding.get(familyStr), reader.getHFileReader().getEncodingOnDisk()); @@ -1089,6 +1094,8 @@ public class TestHFileOutputFormat { } } + // Marked as unstable, recorded in #3297517 + @TestTag({ "unstable" }) @Test public void testFavoredNodes() throws Exception { Random rand = new Random(); @@ -1100,7 +1107,7 @@ public class TestHFileOutputFormat { } private static final int FAVORED_NODES_NUM = 3; private static final int REGION_SERVERS = 10; - /** + /** * Testing FavoredNodes support for HFileOutputFormat */ public void testFavoredNodesPerChar(byte c) throws Exception{ @@ -1239,13 +1246,13 @@ public class TestHFileOutputFormat { } } } - + public static void main(String args[]) throws Exception { new TestHFileOutputFormat().manualTest(args); } - + public void manualTest(String args[]) throws Exception { - Configuration conf = HBaseConfiguration.create(); + Configuration conf = HBaseConfiguration.create(); util = new HBaseTestingUtility(conf); if ("newtable".equals(args[0])) { byte[] tname = args[1].getBytes(); Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestLogSplitOnMasterFailover.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestLogSplitOnMasterFailover.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestLogSplitOnMasterFailover.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestLogSplitOnMasterFailover.java Fri Mar 14 18:09:57 2014 @@ -18,8 +18,8 @@ package org.apache.hadoop.hbase.master; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import java.io.IOException; import java.util.ArrayList; @@ -49,10 +49,13 @@ import org.apache.hadoop.hbase.regionser import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSUtils; import org.apache.hadoop.hbase.util.InjectionEvent; +import org.apache.hadoop.hbase.util.InjectionHandler; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper; -import org.apache.hadoop.hbase.util.InjectionHandler; import org.junit.Test; +import org.junit.runner.RunWith; /** * Tests that the master splits the logs of dead regionservers on startup and @@ -60,6 +63,7 @@ import org.junit.Test; * regionserver to create a need to split logs, and quickly killing a master to * cause master failover. */ +@RunWith(TagRunner.class) public class TestLogSplitOnMasterFailover extends MultiMasterTest { private static final Log LOG = @@ -250,6 +254,8 @@ public class TestLogSplitOnMasterFailove runTest(); } + // Marked as unstable and recored in 3376780 + @TestTag({ "unstable" }) @Test(timeout=280000) public void testWithDistributedLogSplittingAndErrors() throws Exception { // add a split log worker to handle InjectionEvent.SPLITLOGWORKER_SPLIT_LOG_START. @@ -258,12 +264,12 @@ public class TestLogSplitOnMasterFailove InjectionHandler.set(new SplitLogKillInjectionHandler()); runTest(); } - + static class SplitLogKillInjectionHandler extends InjectionHandler { static int count = 0; - + @Override - // kill split log workers the first few times. + // kill split log workers the first few times. protected void _processEventIO(InjectionEvent event, Object... args) throws IOException{ if (event == InjectionEvent.SPLITLOGWORKER_SPLIT_LOG_START) { count++; @@ -275,8 +281,8 @@ public class TestLogSplitOnMasterFailove } } } - - + + private void runTest() throws Exception { startMiniCluster(NUM_MASTERS, NUM_RS); Thread.currentThread().setName(getClass().getSimpleName()); @@ -330,7 +336,7 @@ public class TestLogSplitOnMasterFailove masters = miniCluster().getMasters(); assertEquals(1, masters.size()); - + // Start a few new regionservers. final int EXTRA_RS = 2; for (int i = NUM_RS; i < NUM_RS + EXTRA_RS; ++i) { @@ -338,7 +344,7 @@ public class TestLogSplitOnMasterFailove otherRsNames.add( miniCluster().getRegionServer(i).getServerInfo().getServerName()); } - + // wait for an active master to show up and be ready assertTrue(miniCluster().waitForActiveAndReadyMaster()); Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRSLivenessOnMasterFailover.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRSLivenessOnMasterFailover.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRSLivenessOnMasterFailover.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRSLivenessOnMasterFailover.java Fri Mar 14 18:09:57 2014 @@ -22,17 +22,23 @@ import java.io.IOException; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HServerAddress; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWrapper; import org.apache.zookeeper.KeeperException; import org.junit.Test; +import org.junit.runner.RunWith; /** * Tests that the regionserver correctly picks up the new master location and * does not get stuck in a retry loop trying to contact the old master. */ +@RunWith(TagRunner.class) public class TestRSLivenessOnMasterFailover extends MultiMasterTest { + // Marked as unstable and recorded in 3921469 + @TestTag({ "unstable" }) @Test(timeout=60000) public void testAgainstRSDeadlock() throws IOException, InterruptedException, KeeperException { Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionPlacement.java Fri Mar 14 18:09:57 2014 @@ -57,13 +57,17 @@ import org.apache.hadoop.hbase.master.Re import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.hadoop.hbase.util.Writables; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; import com.google.gson.Gson; +@RunWith(TagRunner.class) public class TestRegionPlacement { final static Log LOG = LogFactory.getLog(TestRegionPlacement.class); private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); @@ -84,7 +88,7 @@ public class TestRegionPlacement { // Enable the favored nodes based load balancer conf.set("hbase.loadbalancer.impl", "org.apache.hadoop.hbase.master.RegionManager$AssignmentLoadBalancer"); - + conf.setInt("hbase.master.meta.thread.rescanfrequency", 5000); conf.setInt("hbase.regionserver.msginterval", 1000); conf.setLong("hbase.regionserver.transientAssignment.regionHoldPeriod", 2000); @@ -114,6 +118,8 @@ public class TestRegionPlacement { * * @throws Exception */ + // Marked as unstable and recorded in #2747703 + @TestTag({ "unstable" }) @Test(timeout = 360000) public void testPrimaryPlacement() throws Exception { // Create a table with REGION_NUM regions. @@ -162,15 +168,17 @@ public class TestRegionPlacement { return expected.equals(rswithNumRegions); } + // Marked as unstable and recored in #2747703 + @TestTag({ "unstable" }) @Test(timeout = 360000) public void testRegionPlacement() throws Exception { AssignmentPlan currentPlan; // ONLY meta regions, ROOT and META, are assigned at beginning. verifyRegionMovementNum(META_REGION_NUM); - + // Create a table with REGION_NUM regions. createTable("testRegionAssignment", REGION_NUM); - + // Test case1: Verify the region assignment for the exiting table // is consistent with the assignment plan and all the region servers get // correctly favored nodes updated. @@ -190,24 +198,24 @@ public class TestRegionPlacement { // Verify all the region server are update with the latest favored nodes verifyRegionServerUpdated(currentPlan); RegionPlacement.printAssignmentPlan(currentPlan); - // Test Case 2: To verify whether the region placement tools can + // Test Case 2: To verify whether the region placement tools can // correctly update the new assignment plan to META and Region Server. // The new assignment plan is generated by shuffle the existing assignment // plan by switching PRIMARY, SECONDARY and TERTIARY nodes. // Shuffle the plan by switching the secondary region server with // the tertiary. - + // Shuffle the secondary with tertiary favored nodes AssignmentPlan shuffledPlan = this.shuffleAssignmentPlan(currentPlan, AssignmentPlan.POSITION.SECONDARY, AssignmentPlan.POSITION.TERTIARY); // Let the region placement update the META and Region Servers rp.updateAssignmentPlan(shuffledPlan); - + // Verify the region assignment. There are supposed to no region reassignment // All the regions are still on the primary regio region server verifyRegionAssignment(shuffledPlan,0, REGION_NUM); - + // Shuffle the plan by switching the primary with secondary and // verify the region reassignment is consistent with the plan. shuffledPlan = this.shuffleAssignmentPlan(currentPlan, @@ -216,8 +224,8 @@ public class TestRegionPlacement { // Let the region placement update the META and Region Servers rp.updateAssignmentPlan(shuffledPlan); verifyRegionAssignment(shuffledPlan, REGION_NUM, REGION_NUM); - - // Test Case 3: Kill the region server with META region and verify the + + // Test Case 3: Kill the region server with META region and verify the // region movements and region on primary region server are expected. HRegionServer meta = this.getRegionServerWithMETA(); // Get the expected the num of the regions on the its primary region server @@ -227,14 +235,14 @@ public class TestRegionPlacement { META_REGION_OVERHEAD; verifyKillRegionServerWithMetaOrRoot(meta, expectedRegionOnPrimaryRS); RegionPlacement.printAssignmentPlan(currentPlan); - // Test Case 4: Kill the region sever with ROOT and verify the + // Test Case 4: Kill the region sever with ROOT and verify the // region movements and region on primary region server are expected. HRegionServer root = this.getRegionServerWithROOT(); // Get the expected the num of the regions on the its primary region server Collection<HRegion> regionOnRootRegionServer = root.getOnlineRegions(); expectedRegionOnPrimaryRS = lastRegionOnPrimaryRSCount - regionOnRootRegionServer.size() + ROOT_REGION_OVERHEAD; - + // Adjust the number by removing the regions just moved to the ROOT region server for (HRegion region : regionOnRootRegionServer) { if (regionOnMetaRegionServer.contains(region)) @@ -249,12 +257,12 @@ public class TestRegionPlacement { * region servers. * Also it will verify weather the number of region movement and * the number regions on the primary region server are expected - * + * * @param plan * @param regionMovementNum * @param numRegionsOnPrimaryRS - * @throws InterruptedException - * @throws IOException + * @throws InterruptedException + * @throws IOException */ private void verifyRegionAssignment(AssignmentPlan plan, int regionMovementNum, int numRegionsOnPrimaryRS) @@ -288,19 +296,19 @@ public class TestRegionPlacement { // Verify this region server with META is also hosting user regions int expectedRegionMovement = server.getOnlineRegions().size(); assertTrue("All the user regions are assigned to this region server: " + - server.getServerInfo().getHostnamePort(), + server.getServerInfo().getHostnamePort(), (expectedRegionMovement < REGION_NUM)); assertTrue("NO the user region is assigned to this region server: " + - server.getServerInfo().getHostnamePort(), + server.getServerInfo().getHostnamePort(), (expectedRegionMovement > 1) ); // Kill the region server; server.kill(); - + // Verify the user regions previously on the killed rs are reassigned. verifyRegionMovementNum(expectedRegionMovement); - - // Verify only expectedRegionOnPrimary of the user regions are assigned + + // Verify only expectedRegionOnPrimary of the user regions are assigned // to the primary region server based on the plan. verifyRegionOnPrimaryRS(expectedRegionOnPrimary); } @@ -321,7 +329,7 @@ public class TestRegionPlacement { } return null; } - + /** * Get the region server who is currently hosting META * @return @@ -347,7 +355,7 @@ public class TestRegionPlacement { throws InterruptedException { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); HMaster m = cluster.getMaster(); - + int retry = 10; long sleep = 3 * TEST_UTIL.getConfiguration(). getInt("hbase.regionserver.msginterval", 1000); @@ -357,13 +365,13 @@ public class TestRegionPlacement { currentRegionOpened = m.getMetrics().getRegionsOpened(); regionMovement= currentRegionOpened - lastRegionOpenedCount; LOG.debug("There are " + regionMovement + "/" + expected + - " regions moved after " + attempt + " attempts"); + " regions moved after " + attempt + " attempts"); Thread.sleep((++attempt) * sleep); } while (regionMovement != expected && attempt <= retry); // update the lastRegionOpenedCount lastRegionOpenedCount = currentRegionOpened; - + assertEquals("There are only " + regionMovement + " instead of " + expected + " region movement for " + attempt + " attempts", regionMovement, expected); @@ -399,7 +407,7 @@ public class TestRegionPlacement { } /** - * Verify the number of user regions is assigned to the primary + * Verify the number of user regions is assigned to the primary * region server based on the plan is expected * @param expectedNum. * @throws IOException @@ -486,6 +494,7 @@ public class TestRegionPlacement { final AtomicInteger totalRegionNum = new AtomicInteger(0); LOG.info("The start of region placement verification"); MetaScannerVisitor visitor = new MetaScannerVisitor() { + @Override public boolean processRow(Result result) throws IOException { try { byte[] regionInfo = result.getValue(HConstants.CATALOG_FAMILY, @@ -536,7 +545,7 @@ public class TestRegionPlacement { " region servers" ); return regionOnPrimaryNum.intValue() ; } - + /** * Create a table with specified table name and region number. * @param table Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionStateOnMasterFailure.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionStateOnMasterFailure.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionStateOnMasterFailure.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/master/TestRegionStateOnMasterFailure.java Fri Mar 14 18:09:57 2014 @@ -52,11 +52,15 @@ import org.apache.hadoop.hbase.regionser import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.JVMClusterUtil.RegionServerThread; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.zookeeper.KeeperException; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.junit.runner.RunWith; +@RunWith(TagRunner.class) public class TestRegionStateOnMasterFailure extends MultiMasterTest { private static final Log LOG = @@ -78,15 +82,16 @@ public class TestRegionStateOnMasterFail private static final int NUM_MASTERS = 2; private static final int NUM_RS = 3; - private static final int TEST_TIMEOUT_MS = 90 * 1000 * 1234567; + private static final int TEST_TIMEOUT_MS = 90 * 1000 * 1234567; private static final Pattern META_AND_ROOT_RE = Pattern.compile( - (Bytes.toStringBinary(HConstants.META_TABLE_NAME) + "|" + + (Bytes.toStringBinary(HConstants.META_TABLE_NAME) + "|" + Bytes.toStringBinary(HConstants.ROOT_TABLE_NAME)).replace(".", "\\.")); private List<HBaseEventHandlerListener> toUnregister = new ArrayList<HBaseEventHandlerListener>(); + @Override @After public void tearDown() throws IOException { for (HBaseEventHandlerListener listener : toUnregister) { @@ -100,7 +105,7 @@ public class TestRegionStateOnMasterFail void closeRegion(HRegion region) throws IOException; } - private class CloseRegionThroughAdmin implements WayToCloseRegion { + private class CloseRegionThroughAdmin implements WayToCloseRegion { @Override public void closeRegion(HRegion region) throws IOException { header("Closing region " + region.getRegionNameAsString()); @@ -109,6 +114,7 @@ public class TestRegionStateOnMasterFail }; private class KillRegionServerWithRegion implements WayToCloseRegion { + @Override public void closeRegion(HRegion region) throws IOException { header("Aborting the region server with the region " + region.getRegionNameAsString()); @@ -116,13 +122,14 @@ public class TestRegionStateOnMasterFail "region " + region); } } - + /** Kills -ROOT- and .META. regionservers */ private class KillRootAndMetaRS implements WayToCloseRegion { + @Override public void closeRegion(HRegion ignored) throws IOException { // Copy the list of region server threads because it will be modified as we kill // -ROOT-/.META. regionservers. - for (RegionServerThread rst : + for (RegionServerThread rst : new ArrayList<RegionServerThread>(miniCluster().getRegionServerThreads())) { HRegionServer rs = rst.getRegionServer(); for (HRegionInfo hri : rs.getRegionsAssignment()) { @@ -181,6 +188,8 @@ public class TestRegionStateOnMasterFail HBaseEventType.RS2ZK_REGION_OPENED); } + // Marked as unstable and recorded in #3920920 + @TestTag({ "unstable" }) @Test(timeout=TEST_TIMEOUT_MS) public void testKillRSWithUserRegion() throws IOException, InterruptedException, KeeperException { @@ -205,7 +214,7 @@ public class TestRegionStateOnMasterFail closeRegionAndKillMaster(HConstants.META_TABLE_NAME, new KillRootAndMetaRS(), HBaseEventType.RS2ZK_REGION_OPENED); } - + public void closeRegionAndKillMaster(byte[] tableName, WayToCloseRegion howToClose, HBaseEventType eventToWatch) throws IOException, InterruptedException, KeeperException { @@ -405,7 +414,7 @@ public class TestRegionStateOnMasterFail LOG.info(REGION_EVENT_MSG + "Event: " + eventType + ", handler: " + event.getClass().getSimpleName()); - if (eventType != eventToWatch || + if (eventType != eventToWatch || !(event instanceof MasterOpenRegionHandler || event instanceof MasterCloseRegionHandler)) { LOG.info(REGION_EVENT_MSG + "Unrecognized event type/class: " + eventType + ", " + Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestThriftMetrics.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestThriftMetrics.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestThriftMetrics.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/metrics/TestThriftMetrics.java Fri Mar 14 18:09:57 2014 @@ -20,7 +20,10 @@ package org.apache.hadoop.hbase.regionserver.metrics; +import java.io.IOException; + import junit.framework.TestCase; + import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.client.Get; @@ -28,14 +31,16 @@ import org.apache.hadoop.hbase.client.HT import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.junit.Test; - -import java.io.IOException; +import org.junit.runner.RunWith; /** * Test to verify that the thrift metrics are calculated and propagated in the * HBaseRpcMetrics. */ +@RunWith(TagRunner.class) public class TestThriftMetrics extends TestCase { private final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); private final int SLAVES = 1; @@ -47,6 +52,8 @@ public class TestThriftMetrics extends T * A simple test to see if the metrics are populated. * @throws IOException */ + // Marked as unstable and recored in #3921380 + @TestTag({ "unstable" }) @Test public void testThriftMetricsArePopulated() throws IOException, InterruptedException { Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestLogRolling.java Fri Mar 14 18:09:57 2014 @@ -31,13 +31,15 @@ import org.apache.hadoop.hbase.HBaseClus import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.regionserver.HRegionServer; -import org.apache.hadoop.hbase.regionserver.HRegion; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.regionserver.HRegion; +import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.FSUtils; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.apache.hadoop.hdfs.DFSClient; import org.apache.hadoop.hdfs.MiniDFSCluster.DataNodeProperties; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; @@ -45,10 +47,12 @@ import org.apache.hadoop.hdfs.server.dat import org.apache.hadoop.hdfs.server.namenode.FSNamesystem; import org.apache.hadoop.hdfs.server.namenode.LeaseManager; import org.apache.log4j.Level; +import org.junit.runner.RunWith; /** * Test log deletion as logs are rolled. */ +@RunWith(TagRunner.class) public class TestLogRolling extends HBaseClusterTestCase { private static final Log LOG = LogFactory.getLog(TestLogRolling.class); private HRegionServer server; @@ -120,11 +124,11 @@ public class TestLogRolling extends HBas /**** configuration for testLogRollOnDatanodeDeath ****/ // make sure log.hflush() calls syncFs() to open a pipeline conf.setBoolean("dfs.support.append", true); - // lower the namenode & datanode heartbeat so the namenode + // lower the namenode & datanode heartbeat so the namenode // quickly detects datanode failures conf.setInt("heartbeat.recheck.interval", 5000); conf.setInt("dfs.heartbeat.interval", 1); - // the namenode might still try to choose the recently-dead datanode + // the namenode might still try to choose the recently-dead datanode // for a pipeline, so try to a new pipeline multiple times conf.setInt("dfs.client.block.write.retries", 30); conf.setBoolean(HConstants.HLOG_FORMAT_BACKWARD_COMPATIBILITY, false); @@ -163,6 +167,8 @@ public class TestLogRolling extends HBas * * @throws Exception */ + // Marked as unstable and recored in #3896573 + @TestTag({ "unstable" }) public void testLogRolling() throws Exception { this.tableName = getName(); try { @@ -202,22 +208,24 @@ public class TestLogRolling extends HBas // continue } } - + /** * Tests that logs are rolled upon detecting datanode death * Requires an HDFS jar with HDFS-826 & syncFs() support (HDFS-200) - * + * * @throws Exception */ + // Marked as unstable and recored in #3344583 + @TestTag({ "unstable" }) public void testLogRollOnDatanodeDeath() throws Exception { - assertTrue("This test requires HLog file replication.", + assertTrue("This test requires HLog file replication.", fs.getDefaultReplication() > 1); - + // When the META table can be opened, the region servers are running new HTable(conf, HConstants.META_TABLE_NAME); this.server = cluster.getRegionServer(0); this.log = server.getLog(0); - + assertTrue("Need HDFS-826 for this test", log.canGetCurReplicas()); // don't run this test without append support (HDFS-200 & HDFS-142) assertTrue("Need append support for this test", FSUtils.isAppendSupported(conf)); @@ -225,7 +233,7 @@ public class TestLogRolling extends HBas // add up the datanode count, to ensure proper replication when we kill 1 dfsCluster.startDataNodes(conf, 1, true, null, null); dfsCluster.waitActive(); - assertTrue(dfsCluster.getDataNodes().size() >= + assertTrue(dfsCluster.getDataNodes().size() >= fs.getDefaultReplication() + 1); // Create the test table and open it @@ -239,12 +247,12 @@ public class TestLogRolling extends HBas long curTime = System.currentTimeMillis(); long oldFilenum = log.getFilenum(); - assertTrue("Log should have a timestamp older than now", + assertTrue("Log should have a timestamp older than now", curTime > oldFilenum && oldFilenum != -1); // normal write writeData(table, 1); - assertTrue("The log shouldn't have rolled yet", + assertTrue("The log shouldn't have rolled yet", oldFilenum == log.getFilenum()); // kill a datanode in the pipeline to force a log roll on the next sync() @@ -257,7 +265,7 @@ public class TestLogRolling extends HBas break; } } - assertTrue("Need DFSOutputStream.getPipeline() for this test", + assertTrue("Need DFSOutputStream.getPipeline() for this test", getPipeline != null); Object repl = getPipeline.invoke(stm, new Object []{} /*NO_ARGS*/); DatanodeInfo[] pipeline = (DatanodeInfo[]) repl; @@ -268,12 +276,12 @@ public class TestLogRolling extends HBas // this write should succeed, but trigger a log roll writeData(table, 2); long newFilenum = log.getFilenum(); - assertTrue("Missing datanode should've triggered a log roll", + assertTrue("Missing datanode should've triggered a log roll", newFilenum > oldFilenum && newFilenum > curTime); - + // write some more log data (this should use a new hdfs_out) writeData(table, 3); - assertTrue("The log should not roll again.", + assertTrue("The log should not roll again.", log.getFilenum() == newFilenum); assertEquals(fs.getDefaultReplication(), log.getLogReplication()); } Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALReplay.java Fri Mar 14 18:09:57 2014 @@ -40,9 +40,12 @@ import org.apache.hadoop.hbase.HTableDes import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.MiniHBaseCluster; +import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Get; +import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.io.hfile.HFile; import org.apache.hadoop.hbase.monitoring.MonitoredTask; @@ -52,20 +55,20 @@ import org.apache.hadoop.hbase.regionser import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.EnvironmentEdge; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; -import org.apache.hadoop.hbase.client.Delete; -import org.apache.hadoop.hbase.client.HTable; -import org.apache.hadoop.hbase.client.ResultScanner; - +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; import org.mockito.Mockito; /** * Test replay of edits out of a WAL split. */ +@RunWith(TagRunner.class) public class TestWALReplay { public static final Log LOG = LogFactory.getLog(TestWALReplay.class); private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); @@ -229,6 +232,7 @@ public class TestWALReplay { * @throws IllegalArgumentException * @throws SecurityException */ + @TestTag({ "unstable" }) @Test public void testReplayEditsWrittenViaHRegion() throws IOException, SecurityException, IllegalArgumentException, @@ -456,6 +460,7 @@ public class TestWALReplay { try { final HRegion region = new HRegion(basedir, newWal, newFS, newConf, hri, null) { + @Override protected boolean internalFlushcache(HLog wal, long myseqid, MonitoredTask status) throws IOException { Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSink.java Fri Mar 14 18:09:57 2014 @@ -19,6 +19,11 @@ */ package org.apache.hadoop.hbase.replication.regionserver; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.concurrent.atomic.AtomicBoolean; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; @@ -34,16 +39,15 @@ import org.apache.hadoop.hbase.regionser import org.apache.hadoop.hbase.regionserver.wal.HLogKey; import org.apache.hadoop.hbase.regionserver.wal.WALEdit; import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.util.TagRunner; +import org.apache.hadoop.hbase.util.TestTag; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - +@RunWith(TagRunner.class) public class TestReplicationSink { private static final Log LOG = @@ -171,6 +175,7 @@ public class TestReplicationSink { * Insert then do different types of deletes * @throws Exception */ + @TestTag({ "unstable" }) @Test public void testMixedDeletes() throws Exception { HLog.Entry[] entries = new HLog.Entry[3]; Modified: hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestProcessBasedCluster.java URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestProcessBasedCluster.java?rev=1577643&r1=1577642&r2=1577643&view=diff ============================================================================== --- hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestProcessBasedCluster.java (original) +++ hbase/branches/0.89-fb/src/test/java/org/apache/hadoop/hbase/util/TestProcessBasedCluster.java Fri Mar 14 18:09:57 2014 @@ -30,10 +30,12 @@ import org.apache.hadoop.hbase.client.HT import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.junit.Test; +import org.junit.runner.RunWith; /** * A basic unit test that spins up a local HBase cluster. */ +@RunWith(TagRunner.class) public class TestProcessBasedCluster { private static final Log LOG = LogFactory.getLog(TestProcessBasedCluster.class); @@ -45,6 +47,8 @@ public class TestProcessBasedCluster { private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); + // Marked as unstable, recorded as #3866088 + @TestTag({ "unstable" }) @Test(timeout=300 * 1000) public void testProcessBasedCluster() throws Exception { ProcessBasedLocalHBaseCluster cluster = new ProcessBasedLocalHBaseCluster(
