diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java index 7a9ddf7..fd0470a 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/HTable.java @@ -178,7 +178,7 @@ public class HTable implements HTableInterface, RegionLocator { this.connection = null; return; } - this.connection = ConnectionManager.getConnectionInternal(conf); + this.connection = (ClusterConnection) ConnectionFactory.createConnection(conf); this.configuration = conf; this.pool = getDefaultExecutor(conf); @@ -250,7 +250,7 @@ public class HTable implements HTableInterface, RegionLocator { @Deprecated public HTable(Configuration conf, final TableName tableName, final ExecutorService pool) throws IOException { - this.connection = ConnectionManager.getConnectionInternal(conf); + this.connection = (ClusterConnection) ConnectionFactory.createConnection(conf); this.configuration = conf; this.pool = pool; if (pool == null) { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSecureLoadIncrementalHFilesSplitRecovery.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSecureLoadIncrementalHFilesSplitRecovery.java index fe9c132..0e877ad 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSecureLoadIncrementalHFilesSplitRecovery.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSecureLoadIncrementalHFilesSplitRecovery.java @@ -32,7 +32,7 @@ import org.junit.experimental.categories.Category; /** * Reruns TestSecureLoadIncrementalHFilesSplitRecovery * using LoadIncrementalHFiles in secure mode. - * This suite is unable to verify the security handoff/turnover + * This suite is unable to verify the security handoff/turnove * as miniCluster is running as system user thus has root privileges * and delegation tokens don't seem to work on miniDFS. * @@ -62,9 +62,8 @@ public class TestSecureLoadIncrementalHFilesSplitRecovery extends TestLoadIncrem } //Disabling this test as it does not work in secure mode - @Test + @Test (timeout=180000) @Override public void testBulkLoadPhaseFailure() { } -} - +} \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java index 6f40551..904eff2 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java @@ -162,7 +162,7 @@ public class TestHBaseFsck { TEST_UTIL.shutdownMiniCluster(); } - @Test + @Test (timeout=180000) public void testHBaseFsck() throws Exception { assertNoErrors(doFsck(conf, false)); TableName table = TableName.valueOf("tableBadMetaAssign"); @@ -449,7 +449,7 @@ public class TestHBaseFsck { /** * This creates a clean table and confirms that the table is clean. */ - @Test + @Test (timeout=180000) public void testHBaseFsckClean() throws Exception { assertNoErrors(doFsck(conf, false)); TableName table = TableName.valueOf("tableClean"); @@ -473,7 +473,7 @@ public class TestHBaseFsck { /** * Test thread pooling in the case where there are more regions than threads */ - @Test + @Test (timeout=180000) public void testHbckThreadpooling() throws Exception { TableName table = TableName.valueOf("tableDupeStartKey"); @@ -492,7 +492,7 @@ public class TestHBaseFsck { } } - @Test + @Test (timeout=180000) public void testHbckFixOrphanTable() throws Exception { TableName table = TableName.valueOf("tableInfo"); FileSystem fs = null; @@ -546,7 +546,7 @@ public class TestHBaseFsck { * * @throws Exception */ - @Test + @Test (timeout=180000) public void testParallelHbck() throws Exception { final ExecutorService service; final Future hbck1,hbck2; @@ -589,7 +589,7 @@ public class TestHBaseFsck { * This create and fixes a bad table with regions that have a duplicate * start key */ - @Test + @Test (timeout=180000) public void testDupeStartKey() throws Exception { TableName table = TableName.valueOf("tableDupeStartKey"); @@ -630,7 +630,7 @@ public class TestHBaseFsck { * This creates a table with region_replica > 1 and verifies hbck runs * successfully */ - @Test + @Test (timeout=180000) public void testHbckWithRegionReplica() throws Exception { TableName table = TableName.valueOf("testHbckWithRegionReplica"); @@ -643,7 +643,7 @@ public class TestHBaseFsck { } } - @Test + @Test (timeout=180000) public void testHbckWithFewerReplica() throws Exception { TableName table = TableName.valueOf("testHbckWithFewerReplica"); @@ -667,7 +667,7 @@ public class TestHBaseFsck { } } - @Test + @Test (timeout=180000) public void testHbckWithExcessReplica() throws Exception { TableName table = TableName.valueOf("testHbckWithExcessReplica"); @@ -765,7 +765,7 @@ public class TestHBaseFsck { * This create and fixes a bad table with regions that have a duplicate * start key */ - @Test + @Test (timeout=180000) public void testDupeRegion() throws Exception { TableName table = TableName.valueOf("tableDupeRegion"); @@ -818,7 +818,7 @@ public class TestHBaseFsck { /** * This creates and fixes a bad table with regions that has startkey == endkey */ - @Test + @Test (timeout=180000) public void testDegenerateRegions() throws Exception { TableName table = TableName.valueOf("tableDegenerateRegions"); try { @@ -858,7 +858,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table where a region is completely contained * by another region. */ - @Test + @Test (timeout=180000) public void testContainedRegionOverlap() throws Exception { TableName table = TableName.valueOf("tableContainedRegionOverlap"); @@ -900,7 +900,7 @@ public class TestHBaseFsck { * region. Mess around the meta data so that closeRegion/offlineRegion * throws exceptions. */ - @Test + @Test (timeout=180000) public void testSidelineOverlapRegion() throws Exception { TableName table = TableName.valueOf("testSidelineOverlapRegion"); @@ -991,7 +991,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table where a region is completely contained * by another region, and there is a hole (sort of like a bad split) */ - @Test + @Test (timeout=180000) public void testOverlapAndOrphan() throws Exception { TableName table = TableName.valueOf("tableOverlapAndOrphan"); @@ -1036,7 +1036,7 @@ public class TestHBaseFsck { * a start key contained in another region and its end key is contained in * yet another region. */ - @Test + @Test (timeout=180000) public void testCoveredStartKey() throws Exception { TableName table = TableName.valueOf("tableCoveredStartKey"); @@ -1077,7 +1077,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table with a missing region -- hole in meta * and data missing in the fs. */ - @Test + @Test (timeout=180000) public void testRegionHole() throws Exception { TableName table = TableName.valueOf("tableRegionHole"); @@ -1112,7 +1112,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table with a missing region -- hole in meta * and data present but .regioinfino missing (an orphan hdfs region)in the fs. */ - @Test + @Test (timeout=180000) public void testHDFSRegioninfoMissing() throws Exception { TableName table = TableName.valueOf("tableHDFSRegioininfoMissing"); @@ -1149,7 +1149,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table with a region that is missing meta and * not assigned to a region server. */ - @Test + @Test (timeout=180000) public void testNotInMetaOrDeployedHole() throws Exception { TableName table = TableName.valueOf("tableNotInMetaOrDeployedHole"); @@ -1184,7 +1184,7 @@ public class TestHBaseFsck { /** * This creates fixes a bad table with a hole in meta. */ - @Test + @Test (timeout=180000) public void testNotInMetaHole() throws Exception { TableName table = TableName.valueOf("tableNotInMetaHole"); @@ -1220,7 +1220,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table with a region that is in meta but has * no deployment or data hdfs */ - @Test + @Test (timeout=180000) public void testNotInHdfs() throws Exception { TableName table = TableName.valueOf("tableNotInHdfs"); @@ -1255,7 +1255,7 @@ public class TestHBaseFsck { * This creates and fixes a bad table with a region that is in meta but has * no deployment or data hdfs. The table has region_replication set to 2. */ - @Test + @Test (timeout=180000) public void testNotInHdfsWithReplicas() throws Exception { TableName table = TableName.valueOf("tableNotInHdfs"); @@ -1328,7 +1328,7 @@ public class TestHBaseFsck { * This creates entries in hbase:meta with no hdfs data. This should cleanly * remove the table. */ - @Test + @Test (timeout=180000) public void testNoHdfsTable() throws Exception { TableName table = TableName.valueOf("NoHdfsTable"); setupTable(table); @@ -1378,7 +1378,7 @@ public class TestHBaseFsck { /** * when the hbase.version file missing, It is fix the fault. */ - @Test + @Test (timeout=180000) public void testNoVersionFile() throws Exception { // delete the hbase.version file Path rootDir = FSUtils.getRootDir(conf); @@ -1399,7 +1399,7 @@ public class TestHBaseFsck { /** * The region is not deployed when the table is disabled. */ - @Test + @Test (timeout=180000) public void testRegionShouldNotBeDeployed() throws Exception { TableName table = TableName.valueOf("tableRegionShouldNotBeDeployed"); @@ -1460,7 +1460,7 @@ public class TestHBaseFsck { /** * This creates two tables and mess both of them and fix them one by one */ - @Test + @Test (timeout=180000) public void testFixByTable() throws Exception { TableName table1 = TableName.valueOf("testFixByTable1"); @@ -1506,7 +1506,7 @@ public class TestHBaseFsck { /** * A split parent in meta, in hdfs, and not deployed */ - @Test + @Test (timeout=180000) public void testLingeringSplitParent() throws Exception { TableName table = TableName.valueOf("testLingeringSplitParent"); @@ -1586,7 +1586,7 @@ public class TestHBaseFsck { * Tests that LINGERING_SPLIT_PARENT is not erroneously reported for * valid cases where the daughters are there. */ - @Test + @Test (timeout=180000) public void testValidLingeringSplitParent() throws Exception { TableName table = TableName.valueOf("testLingeringSplitParent"); @@ -1788,7 +1788,7 @@ public class TestHBaseFsck { /** * Test -noHdfsChecking option can detect and fix assignments issue. */ - @Test + @Test (timeout=180000) public void testFixAssignmentsAndNoHdfsChecking() throws Exception { TableName table = TableName.valueOf("testFixAssignmentsAndNoHdfsChecking"); @@ -1838,7 +1838,7 @@ public class TestHBaseFsck { * However, it can not fix it without checking Hdfs because we need to get * the region info from Hdfs in this case, then to patch the meta. */ - @Test + @Test (timeout=180000) public void testFixMetaNotWorkingWithNoHdfsChecking() throws Exception { TableName table = TableName.valueOf("testFixMetaNotWorkingWithNoHdfsChecking"); @@ -1892,7 +1892,7 @@ public class TestHBaseFsck { * Test -fixHdfsHoles doesn't work with -noHdfsChecking option, * and -noHdfsChecking can't detect orphan Hdfs region. */ - @Test + @Test (timeout=180000) public void testFixHdfsHolesNotWorkingWithNoHdfsChecking() throws Exception { TableName table = TableName.valueOf("testFixHdfsHolesNotWorkingWithNoHdfsChecking"); @@ -2147,7 +2147,7 @@ public class TestHBaseFsck { /** * Test fixing lingering reference file. */ - @Test + @Test (timeout=180000) public void testLingeringReferenceFile() throws Exception { TableName table = TableName.valueOf("testLingeringReferenceFile"); @@ -2177,7 +2177,7 @@ public class TestHBaseFsck { /** * Test mission REGIONINFO_QUALIFIER in hbase:meta */ - @Test + @Test (timeout=180000) public void testMissingRegionInfoQualifier() throws Exception { TableName table = TableName.valueOf("testMissingRegionInfoQualifier"); @@ -2231,7 +2231,7 @@ public class TestHBaseFsck { * Test pluggable error reporter. It can be plugged in * from system property or configuration. */ - @Test + @Test (timeout=180000) public void testErrorReporter() throws Exception { try { MockErrorReporter.calledCount = 0; @@ -2395,7 +2395,7 @@ public class TestHBaseFsck { writeLock.release(); // release for clean state } - @Test + @Test (timeout=180000) public void testMetaOffline() throws Exception { // check no errors HBaseFsck hbck = doFsck(conf, false); @@ -2449,7 +2449,7 @@ public class TestHBaseFsck { } } - @Test + @Test (timeout=180000) public void testTableWithNoRegions() throws Exception { // We might end up with empty regions in a table // see also testNoHdfsTable() @@ -2483,7 +2483,7 @@ public class TestHBaseFsck { } - @Test + @Test (timeout=180000) public void testHbckAfterRegionMerge() throws Exception { TableName table = TableName.valueOf("testMergeRegionFilesInHdfs"); Table meta = null; @@ -2531,7 +2531,7 @@ public class TestHBaseFsck { } } - @Test + @Test (timeout=180000) public void testRegionBoundariesCheck() throws Exception { HBaseFsck hbck = doFsck(conf, false); assertNoErrors(hbck); // no errors @@ -2547,7 +2547,7 @@ public class TestHBaseFsck { @org.junit.Rule public TestName name = new TestName(); - @Test + @Test (timeout=180000) public void testReadOnlyProperty() throws Exception { HBaseFsck hbck = doFsck(conf, false); Assert.assertEquals("shouldIgnorePreCheckPermission", true,