hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-14516 categorize hadoop-compat tests
Date Fri, 04 Dec 2015 18:28:12 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 b04a09da3 -> 6a5d3f701


HBASE-14516 categorize hadoop-compat tests

* make sure the test classifications are in test scope for their use in the hadoop-compat
modules
* added a test category for 'metrics related' since that's what all these tests are for
* categorized tests as small,metrics

Conflicts:
	hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java

Conflicts:
	hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6a5d3f70
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6a5d3f70
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6a5d3f70

Branch: refs/heads/0.98
Commit: 6a5d3f70101ae7bd7f94df2ef75ec60bd511fbff
Parents: b04a09d
Author: Sean Busbey <busbey@apache.org>
Authored: Tue Sep 29 20:09:48 2015 -0500
Committer: Sean Busbey <busbey@cloudera.com>
Committed: Fri Dec 4 12:19:11 2015 -0600

----------------------------------------------------------------------
 .../hbase/testclassification/MetricsTests.java  | 25 ++++++++++++++++++++
 hbase-hadoop-compat/pom.xml                     |  6 +++++
 .../TestCompatibilitySingletonFactory.java      |  5 ++++
 .../master/TestMetricsMasterSourceFactory.java  |  4 ++++
 .../TestMetricsRegionServerSourceFactory.java   |  4 ++++
 .../regionserver/wal/TestMetricsHLogSource.java |  4 ++++
 .../TestMetricsReplicationSourceFactory.java    |  4 ++++
 .../hbase/rest/TestMetricsRESTSource.java       |  4 ++++
 .../TestMetricsThriftServerSourceFactory.java   |  4 ++++
 hbase-hadoop1-compat/pom.xml                    |  6 +++++
 .../master/TestMetricsMasterSourceImpl.java     |  5 ++++
 .../hbase/metrics/TestBaseSourceImpl.java       |  5 ++++
 .../TestMetricsRegionServerSourceImpl.java      |  5 ++++
 .../TestMetricsRegionSourceImpl.java            |  5 ++++
 .../wal/TestMetricsWALSourceImpl.java           |  5 ++++
 .../TestMetricsReplicationSourceImpl.java       |  5 ++++
 .../TestReplicationMetricsSourceImpl.java       |  5 ++++
 .../hbase/rest/TestRESTMetricsSourceImpl.java   |  5 ++++
 ...estThriftServerMetricsSourceFactoryImpl.java |  4 ++++
 hbase-hadoop2-compat/pom.xml                    |  6 +++++
 .../master/TestMetricsMasterSourceImpl.java     |  4 ++++
 .../hbase/metrics/TestBaseSourceImpl.java       |  4 ++++
 .../TestMetricsRegionServerSourceImpl.java      |  4 ++++
 .../TestMetricsRegionSourceImpl.java            |  4 ++++
 .../wal/TestMetricsWALSourceImpl.java           |  4 ++++
 ...TestMetricsReplicationSourceFactoryImpl.java |  4 ++++
 .../TestMetricsReplicationSourceImpl.java       |  4 ++++
 .../hbase/rest/TestMetricsRESTSourceImpl.java   |  4 ++++
 ...estMetricsThriftServerSourceFactoryImpl.java |  4 ++++
 29 files changed, 152 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/MetricsTests.java
----------------------------------------------------------------------
diff --git a/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/MetricsTests.java
b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/MetricsTests.java
new file mode 100644
index 0000000..c16d64e
--- /dev/null
+++ b/hbase-annotations/src/test/java/org/apache/hadoop/hbase/testclassification/MetricsTests.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Tag a test that covers our metrics handling
+ */
+package org.apache.hadoop.hbase.testclassification;
+
+public interface MetricsTests {
+}

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/pom.xml b/hbase-hadoop-compat/pom.xml
index 675748f..6b45b82 100644
--- a/hbase-hadoop-compat/pom.xml
+++ b/hbase-hadoop-compat/pom.xml
@@ -107,6 +107,12 @@
     </build>
 
     <dependencies>
+      <dependency>
+        <groupId>org.apache.hbase</groupId>
+        <artifactId>hbase-annotations</artifactId>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
       <!-- General dependencies -->
       <dependency>
         <groupId>commons-logging</groupId>

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/TestCompatibilitySingletonFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/TestCompatibilitySingletonFactory.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/TestCompatibilitySingletonFactory.java
index db5a1a3..f942059 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/TestCompatibilitySingletonFactory.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/TestCompatibilitySingletonFactory.java
@@ -26,11 +26,16 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
 
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestCompatibilitySingletonFactory {
 
   private static final int ITERATIONS = 100000;

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceFactory.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceFactory.java
index 3d83975..91efd39 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceFactory.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceFactory.java
@@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.master;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.master.MetricsMasterSource;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  *  Test for the CompatibilitySingletonFactory and building MetricsMasterSource
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsMasterSourceFactory {
 
   @Test(expected=RuntimeException.class)

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceFactory.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceFactory.java
index 1326b85..fbf1994 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceFactory.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceFactory.java
@@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.regionserver;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.regionserver.MetricsRegionServerSourceFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  *  Test for the CompatibilitySingletonFactory and building MetricsRegionServerSource
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRegionServerSourceFactory {
 
   @Test(expected=RuntimeException.class)

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java
index b2bf1f2..7daa4d3 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsHLogSource.java
@@ -19,8 +19,12 @@
 package org.apache.hadoop.hbase.regionserver.wal;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsHLogSource {
 
   @Test(expected=RuntimeException.class)

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactory.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactory.java
index 637b6f7..3a8bb89 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactory.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactory.java
@@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.replication.regionserver;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  *  Test for the CompatibilitySingletonFactory and building MetricsReplicationSource
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsReplicationSourceFactory {
 
   @Test(expected=RuntimeException.class)

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSource.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSource.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSource.java
index 0691fa1..ee2f164 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSource.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSource.java
@@ -20,11 +20,15 @@ package org.apache.hadoop.hbase.rest;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.rest.MetricsRESTSource;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  *   Test of Rest Metrics Source interface.
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRESTSource {
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactory.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactory.java
b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactory.java
index bd132bb..f33135e 100644
--- a/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactory.java
+++ b/hbase-hadoop-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactory.java
@@ -19,12 +19,16 @@
 package org.apache.hadoop.hbase.thrift;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * Test for the interface of MetricsThriftServerSourceFactory
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsThriftServerSourceFactory {
 
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/pom.xml b/hbase-hadoop1-compat/pom.xml
index 2f850f8..d1b31cc 100644
--- a/hbase-hadoop1-compat/pom.xml
+++ b/hbase-hadoop1-compat/pom.xml
@@ -80,6 +80,12 @@ limitations under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-annotations</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-hadoop-compat</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
index 4cdd606..ec8de37 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
@@ -22,7 +22,11 @@ import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.master.MetricsMasterSource;
 import org.apache.hadoop.hbase.master.MetricsMasterSourceFactory;
 import org.apache.hadoop.hbase.master.MetricsMasterSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -30,6 +34,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *  Test for MetricsMasterSourceImpl
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsMasterSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
index 400609b..51e5393 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
@@ -18,10 +18,14 @@
 
 package org.apache.hadoop.hbase.metrics;
 
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.apache.hadoop.metrics2.lib.MetricMutableCounterLong;
 import org.apache.hadoop.metrics2.lib.MetricMutableGaugeLong;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -30,6 +34,7 @@ import static org.junit.Assert.assertSame;
 /**
  * Test of the default BaseSource implementation for hadoop 1
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestBaseSourceImpl {
 
   private static BaseSourceImpl bmsi;

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
index 7509bf5..0475ab0 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
@@ -19,7 +19,11 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -27,6 +31,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Test for MetricsRegionServerSourceImpl
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRegionServerSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
index 3251e8b..95c3225 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
@@ -24,11 +24,16 @@ import java.util.Map;
 import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRegionSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
index 66684d7..f07a890 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
@@ -19,11 +19,16 @@
 package org.apache.hadoop.hbase.regionserver.wal;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsWALSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
index bd7f3dd..69e8c82 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
@@ -21,11 +21,16 @@ package org.apache.hadoop.hbase.replication.regionserver;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertTrue;
 
 /** Test for MetricsReplicationSourceImpl */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsReplicationSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationMetricsSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationMetricsSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationMetricsSourceImpl.java
index dd1c3a7..10f1174 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationMetricsSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationMetricsSourceImpl.java
@@ -21,13 +21,18 @@ package org.apache.hadoop.hbase.replication.regionserver;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertTrue;
 
 /**
  *  Test to make sure that MetricsReplicationSourceImpl is hooked up to ServiceLoader
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestReplicationMetricsSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/rest/TestRESTMetricsSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/rest/TestRESTMetricsSourceImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/rest/TestRESTMetricsSourceImpl.java
index 30ffd6e..ba461c6 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/rest/TestRESTMetricsSourceImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/rest/TestRESTMetricsSourceImpl.java
@@ -21,7 +21,11 @@ package org.apache.hadoop.hbase.rest;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.rest.MetricsRESTSource;
 import org.apache.hadoop.hbase.rest.MetricsRESTSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
+
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -29,6 +33,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *  Test for hadoop1's version of MetricsRESTSource
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestRESTMetricsSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerMetricsSourceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerMetricsSourceFactoryImpl.java
b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerMetricsSourceFactoryImpl.java
index c768399..6927335 100644
--- a/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerMetricsSourceFactoryImpl.java
+++ b/hbase-hadoop1-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServerMetricsSourceFactoryImpl.java
@@ -19,9 +19,12 @@
 package org.apache.hadoop.hbase.thrift;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory;
 import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactoryImpl;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
@@ -30,6 +33,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *    Test the hadoop 1 version of MetricsThriftServerSourceFactory
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestThriftServerMetricsSourceFactoryImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/pom.xml
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/pom.xml b/hbase-hadoop2-compat/pom.xml
index cdbaf0e..ecaed7c 100644
--- a/hbase-hadoop2-compat/pom.xml
+++ b/hbase-hadoop2-compat/pom.xml
@@ -152,6 +152,12 @@ limitations under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.hbase</groupId>
+      <artifactId>hbase-annotations</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.hbase</groupId>
       <artifactId>hbase-hadoop-compat</artifactId>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
index 4cdd606..cdef0a1 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/master/TestMetricsMasterSourceImpl.java
@@ -22,7 +22,10 @@ import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.master.MetricsMasterSource;
 import org.apache.hadoop.hbase.master.MetricsMasterSourceFactory;
 import org.apache.hadoop.hbase.master.MetricsMasterSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -30,6 +33,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *  Test for MetricsMasterSourceImpl
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsMasterSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
index 3c9d792..7381fb9 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/metrics/TestBaseSourceImpl.java
@@ -18,10 +18,13 @@
 
 package org.apache.hadoop.hbase.metrics;
 
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.apache.hadoop.metrics2.lib.MutableCounterLong;
 import org.apache.hadoop.metrics2.lib.MutableGaugeLong;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNull;
@@ -29,6 +32,7 @@ import static org.junit.Assert.assertNull;
 /**
  *  Test of default BaseSource for hadoop 2
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestBaseSourceImpl {
 
   private static BaseSourceImpl bmsi;

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
index e6e16c7..05a5522 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionServerSourceImpl.java
@@ -19,7 +19,10 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
@@ -27,6 +30,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *  Test for MetricsRegionServerSourceImpl
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRegionServerSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
index 42397d7..a7339f2 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/TestMetricsRegionSourceImpl.java
@@ -25,8 +25,12 @@ import java.util.Map;
 
 import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRegionSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
index 088a8cf..ddfed45 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestMetricsWALSourceImpl.java
@@ -18,11 +18,15 @@
 package org.apache.hadoop.hbase.regionserver.wal;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsWALSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactoryImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactoryImpl.java
index cf5e932..f7de90b 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactoryImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceFactoryImpl.java
@@ -19,10 +19,14 @@
 package org.apache.hadoop.hbase.replication.regionserver;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.*;
 
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsReplicationSourceFactoryImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
index bd7f3dd..acbadbe 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestMetricsReplicationSourceImpl.java
@@ -21,10 +21,14 @@ package org.apache.hadoop.hbase.replication.regionserver;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSource;
 import org.apache.hadoop.hbase.replication.regionserver.MetricsReplicationSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertTrue;
 
+@Category({MetricsTests.class, SmallTests.class})
 /** Test for MetricsReplicationSourceImpl */
 public class TestMetricsReplicationSourceImpl {
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java
index 5f4e70b..8069388 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/rest/TestMetricsRESTSourceImpl.java
@@ -21,7 +21,10 @@ package org.apache.hadoop.hbase.rest;
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
 import org.apache.hadoop.hbase.rest.MetricsRESTSource;
 import org.apache.hadoop.hbase.rest.MetricsRESTSourceImpl;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
@@ -29,6 +32,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *   Test for hadoop 2's version of MetricsRESTSource
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsRESTSourceImpl {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hbase/blob/6a5d3f70/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java
b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java
index c9eda58..c3a32b9 100644
--- a/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java
+++ b/hbase-hadoop2-compat/src/test/java/org/apache/hadoop/hbase/thrift/TestMetricsThriftServerSourceFactoryImpl.java
@@ -19,9 +19,12 @@
 package org.apache.hadoop.hbase.thrift;
 
 import org.apache.hadoop.hbase.CompatibilitySingletonFactory;
+import org.apache.hadoop.hbase.testclassification.SmallTests;
+import org.apache.hadoop.hbase.testclassification.MetricsTests;
 import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactory;
 import org.apache.hadoop.hbase.thrift.MetricsThriftServerSourceFactoryImpl;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertSame;
@@ -30,6 +33,7 @@ import static org.junit.Assert.assertTrue;
 /**
  *   Test for hadoop 2's version of MetricsThriftServerSourceFactory
  */
+@Category({MetricsTests.class, SmallTests.class})
 public class TestMetricsThriftServerSourceFactoryImpl {
 
   @Test


Mime
View raw message