158159160161162163164165166167168
ok = (ok && uniqueBlocksTotalWeight == weight); } } while (!ok && System.currentTimeMillis() < maxTime); assertTrue(ok); } finally { htu.shutdownMiniDFSCluster(); } try { // set up a cluster with 4 nodes
193194195196197198199200201202203
// NameNode is informed asynchronously, so we may have a delay. See HBASE-6175 } while (uniqueBlocksTotalWeight != weight && System.currentTimeMillis() < maxTime); assertTrue(uniqueBlocksTotalWeight == weight); } finally { htu.shutdownMiniDFSCluster(); } try { // set up a cluster with 4 nodes
221222223224225226227228229230231
} while (blocksDistribution.getTopHosts().size() != 3 && System.currentTimeMillis() < maxTime); assertEquals("Wrong number of hosts distributing blocks.", 3, blocksDistribution.getTopHosts().size()); } finally { htu.shutdownMiniDFSCluster(); } } @Test public void testPermMask() throws Exception {
99100101102103104105106107108109
} finally { masterActive = false; firstRS.set(true); TEST_UTIL.shutdownMiniZKCluster(); TEST_UTIL.cleanupTestDir(); TEST_UTIL.shutdownMiniDFSCluster(); } } public static class MockedRegionServer extends MiniHBaseCluster.MiniHBaseClusterRegionServer {
159160161162163164165166167168169
194195196197198199200201202203204
222223224225226227228229230231232
130131132133134135136137138139140
List<MasterThread> masterThreads = cluster.getMasters(); // make sure all the masters properly shutdown assertEquals(0, masterThreads.size()); TEST_UTIL.shutdownMiniZKCluster(); TEST_UTIL.shutdownMiniDFSCluster(); TEST_UTIL.cleanupTestDir(); } }
166167168169170171172173174175176
201202203204205206207208209210211