Runs the HDFS secondary namenode. See Secondary NameNode diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7511d5959e1..d355bf4f803 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -276,6 +276,8 @@ Release 0.23.1 - UNRELEASED HDFS-2818. Fix a missing space issue in HDFS webapps' title tags. (Devaraj K via harsh) + HDFS-2397. Undeprecate SecondaryNameNode (eli) + OPTIMIZATIONS HDFS-2130. Switch default checksum to CRC32C. (todd) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/docs/src/documentation/content/xdocs/hdfs_user_guide.xml b/hadoop-hdfs-project/hadoop-hdfs/src/main/docs/src/documentation/content/xdocs/hdfs_user_guide.xml index 0d3ed89c7f8..4d2c6dd0735 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/docs/src/documentation/content/xdocs/hdfs_user_guide.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/docs/src/documentation/content/xdocs/hdfs_user_guide.xml @@ -112,17 +112,18 @@ problems.
The NameNode stores modifications to the file system as a log
appended to a native file system file, edits
.
@@ -287,7 +283,9 @@
secondarynamenode.
NameNode persists its namespace using two files: fsimage
,
which is the latest checkpoint of the namespace and edits
,
a journal (log) of changes to the namespace since the checkpoint.
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
index d84b1a2dd03..f605f617527 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java
@@ -87,7 +87,6 @@
* primary NameNode.
*
**********************************************************/
-@Deprecated // use BackupNode with -checkpoint argument instead.
@InterfaceAudience.Private
public class SecondaryNameNode implements Runnable {
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
index 1717f6c0b2e..52da95725ad 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestCheckpoint.java
@@ -204,7 +204,6 @@ public void testWriteTransactionIdHandlesIOE() throws Exception {
/*
* Simulate namenode crashing after rolling edit log.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryNamenodeError1()
throws IOException {
LOG.info("Starting testSecondaryNamenodeError1");
@@ -266,7 +265,6 @@ public void testSecondaryNamenodeError1()
/*
* Simulate a namenode crash after uploading new image
*/
- @SuppressWarnings("deprecation")
public void testSecondaryNamenodeError2() throws IOException {
LOG.info("Starting testSecondaryNamenodeError2");
Configuration conf = new HdfsConfiguration();
@@ -325,7 +323,6 @@ public void testSecondaryNamenodeError2() throws IOException {
/*
* Simulate a secondary namenode crash after rolling the edit log.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryNamenodeError3() throws IOException {
LOG.info("Starting testSecondaryNamenodeError3");
Configuration conf = new HdfsConfiguration();
@@ -395,7 +392,6 @@ public void testSecondaryNamenodeError3() throws IOException {
* back to the name-node.
* Used to truncate primary fsimage file.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryFailsToReturnImage() throws IOException {
LOG.info("Starting testSecondaryFailsToReturnImage");
Configuration conf = new HdfsConfiguration();
@@ -472,7 +468,6 @@ public void testNameNodeImageSendFailWrongDigest()
* @param errorType the ErrorSimulator type to trigger
* @param exceptionSubstring an expected substring of the triggered exception
*/
- @SuppressWarnings("deprecation")
private void doSendFailTest(int errorType, String exceptionSubstring)
throws IOException {
Configuration conf = new HdfsConfiguration();
@@ -587,7 +582,6 @@ public void testSeparateEditsDirLocking() throws IOException {
/**
* Test that the SecondaryNameNode properly locks its storage directories.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryNameNodeLocking() throws Exception {
// Start a primary NN so that the secondary will start successfully
Configuration conf = new HdfsConfiguration();
@@ -680,7 +674,6 @@ private static void assertClusterStartFailsWhenDirLocked(
* 2. if the NN does not contain an image, importing a checkpoint
* succeeds and re-saves the image
*/
- @SuppressWarnings("deprecation")
public void testImportCheckpoint() throws Exception {
Configuration conf = new HdfsConfiguration();
Path testPath = new Path("/testfile");
@@ -761,16 +754,12 @@ private static void removeAndRecreateDir(File dir) throws IOException {
throw new IOException("Cannot create directory " + dir);
}
- // This deprecation suppress warning does not work due to known Java bug:
- // http://bugs.sun.com/view_bug.do?bug_id=6460147
- @SuppressWarnings("deprecation")
SecondaryNameNode startSecondaryNameNode(Configuration conf
) throws IOException {
conf.set(DFSConfigKeys.DFS_NAMENODE_SECONDARY_HTTP_ADDRESS_KEY, "0.0.0.0:0");
return new SecondaryNameNode(conf);
}
- @SuppressWarnings("deprecation")
SecondaryNameNode startSecondaryNameNode(Configuration conf, int index)
throws IOException {
Configuration snnConf = new Configuration(conf);
@@ -783,7 +772,6 @@ SecondaryNameNode startSecondaryNameNode(Configuration conf, int index)
/**
* Tests checkpoint in HDFS.
*/
- @SuppressWarnings("deprecation")
public void testCheckpoint() throws IOException {
Path file1 = new Path("checkpoint.dat");
Path file2 = new Path("checkpoint2.dat");
@@ -1010,7 +998,6 @@ public void testCheckpointSignature() throws IOException {
* - it then fails again for the same reason
* - it then tries to checkpoint a third time
*/
- @SuppressWarnings("deprecation")
public void testCheckpointAfterTwoFailedUploads() throws IOException {
MiniDFSCluster cluster = null;
SecondaryNameNode secondary = null;
@@ -1065,7 +1052,6 @@ public void testCheckpointAfterTwoFailedUploads() throws IOException {
*
* @throws IOException
*/
- @SuppressWarnings("deprecation")
public void testMultipleSecondaryNamenodes() throws IOException {
Configuration conf = new HdfsConfiguration();
String nameserviceId1 = "ns1";
@@ -1115,7 +1101,6 @@ public void testMultipleSecondaryNamenodes() throws IOException {
* Test that the secondary doesn't have to re-download image
* if it hasn't changed.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryImageDownload() throws IOException {
LOG.info("Starting testSecondaryImageDownload");
Configuration conf = new HdfsConfiguration();
@@ -1198,7 +1183,6 @@ public void testSecondaryImageDownload() throws IOException {
* It verifies that this works even though the earlier-txid checkpoint gets
* uploaded after the later-txid checkpoint.
*/
- @SuppressWarnings("deprecation")
public void testMultipleSecondaryNNsAgainstSameNN() throws Exception {
Configuration conf = new HdfsConfiguration();
@@ -1284,7 +1268,6 @@ public void testMultipleSecondaryNNsAgainstSameNN() throws Exception {
* It verifies that one of the two gets an error that it's uploading a
* duplicate checkpoint, and the other one succeeds.
*/
- @SuppressWarnings("deprecation")
public void testMultipleSecondaryNNsAgainstSameNN2() throws Exception {
Configuration conf = new HdfsConfiguration();
@@ -1383,7 +1366,6 @@ protected Object passThrough(InvocationOnMock invocation) throws Throwable {
* is running. The secondary should shut itself down if if talks to a NN
* with the wrong namespace.
*/
- @SuppressWarnings("deprecation")
public void testReformatNNBetweenCheckpoints() throws IOException {
MiniDFSCluster cluster = null;
SecondaryNameNode secondary = null;
@@ -1638,7 +1620,6 @@ public void testCheckpointWithSeparateDirsAfterNameFails() throws Exception {
/**
* Test that the 2NN triggers a checkpoint after the configurable interval
*/
- @SuppressWarnings("deprecation")
public void testCheckpointTriggerOnTxnCount() throws Exception {
MiniDFSCluster cluster = null;
SecondaryNameNode secondary = null;
@@ -1692,7 +1673,6 @@ public Boolean get() {
* logs that connect the 2NN's old checkpoint to the current txid
* get archived. Then, the 2NN tries to checkpoint again.
*/
- @SuppressWarnings("deprecation")
public void testSecondaryHasVeryOutOfDateImage() throws IOException {
MiniDFSCluster cluster = null;
SecondaryNameNode secondary = null;
@@ -1730,7 +1710,6 @@ public void testSecondaryHasVeryOutOfDateImage() throws IOException {
}
}
- @SuppressWarnings("deprecation")
public void testCommandLineParsing() throws ParseException {
SecondaryNameNode.CommandLineOpts opts =
new SecondaryNameNode.CommandLineOpts();
@@ -1765,7 +1744,6 @@ public void testCommandLineParsing() throws ParseException {
} catch (ParseException e) {}
}
- @SuppressWarnings("deprecation")
private void cleanup(SecondaryNameNode snn) {
if (snn != null) {
try {
@@ -1781,7 +1759,6 @@ private void cleanup(SecondaryNameNode snn) {
* Assert that if any two files have the same name across the 2NNs
* and NN, they should have the same content too.
*/
- @SuppressWarnings("deprecation")
private void assertParallelFilesInvariant(MiniDFSCluster cluster,
ImmutableList