7475767778798081828384
} } finally { // restore its old permission dir1.setWritable(true); dir2.setWritable(true); cluster.shutdown(); } } public void testReplicationError() throws Exception { // bring up a cluster of 1
147148149150151152153154155156157
DFSTestUtil.waitReplication(fs, fileName, (short)1); // clean up the file fs.delete(fileName, false); } finally { cluster.shutdown(); } } public void testLocalDirs() throws Exception { Configuration conf = new Configuration();
177178179180181182183184185186
", while expected is " + expected, expected, actual); } } finally { if (cluster != null) cluster.shutdown(); } } }
121122123124125126127128129130131
// File first = namedirs.iterator().next(); removeOneNameDir(first); try { cluster = new MiniDFSCluster(conf, 0, false, null); cluster.shutdown(); assertTrue(false); } catch (Throwable t) { // no nothing } resurrectNameDir(first); // put back namedir
163164165166167168169170171172173
// writeFile(fileSys, file1, replication); checkFile(fileSys, file1, replication); } finally { fileSys.close(); cluster.shutdown(); } // // Restart cluster and verify that file exists. // Then take another checkpoint to verify that the
201202203204205206207208209210211
SecondaryNameNode secondary = startSecondaryNameNode(conf); secondary.doCheckpoint(); secondary.shutdown(); } finally { fileSys.close(); cluster.shutdown(); } } /* * Simulate a namenode crash after uploading new image
239240241242243244245246247248249
259260261262263264265266267268269
SecondaryNameNode secondary = startSecondaryNameNode(conf); secondary.doCheckpoint(); secondary.shutdown(); } finally { fileSys.close(); cluster.shutdown(); } } /* * Simulate a secondary namenode crash after rolling the edit log.
305306307308309310311312313314315
325326327328329330331332333334335
SecondaryNameNode secondary = startSecondaryNameNode(conf); secondary.doCheckpoint(); secondary.shutdown(); } finally { fileSys.close(); cluster.shutdown(); } } /** * Simulate a secondary node failure to transfer image