瀏覽代碼

HDFS-500. Deprecate NameNode methods deprecated in NameNodeProtocol. Contributed by Jakob Homan.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@799430 13f79535-47bb-0310-9956-ffa450edef68
Konstantin Shvachko 16 年之前
父節點
當前提交
9807968bed
共有 2 個文件被更改,包括 8 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 5 0
      src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java

+ 3 - 0
CHANGES.txt

@@ -57,6 +57,9 @@ Trunk (unreleased changes)
     HDFS-510. Rename DatanodeBlockInfo to be ReplicaInfo.
     HDFS-510. Rename DatanodeBlockInfo to be ReplicaInfo.
     (Jakob Homan & Hairong Kuang via shv)
     (Jakob Homan & Hairong Kuang via shv)
 
 
+    HDFS-500. Deprecate NameNode methods deprecated in NameNodeProtocol.
+    (Jakob Homan via shv)
+
   BUG FIXES
   BUG FIXES
     HDFS-76. Better error message to users when commands fail because of 
     HDFS-76. Better error message to users when commands fail because of 
     lack of quota. Allow quota to be set even if the limit is lower than
     lack of quota. Allow quota to be set even if the limit is lower than

+ 5 - 0
src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java

@@ -818,6 +818,7 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
   /**
   /**
    * Returns the size of the current edit log.
    * Returns the size of the current edit log.
    */
    */
+  @Deprecated
   public long getEditLogSize() throws IOException {
   public long getEditLogSize() throws IOException {
     return namesystem.getEditLogSize();
     return namesystem.getEditLogSize();
   }
   }
@@ -825,6 +826,7 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
   /**
   /**
    * Roll the edit log.
    * Roll the edit log.
    */
    */
+  @Deprecated
   public CheckpointSignature rollEditLog() throws IOException {
   public CheckpointSignature rollEditLog() throws IOException {
     return namesystem.rollEditLog();
     return namesystem.rollEditLog();
   }
   }
@@ -832,6 +834,7 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
   /**
   /**
    * Roll the image 
    * Roll the image 
    */
    */
+  @Deprecated
   public void rollFsImage() throws IOException {
   public void rollFsImage() throws IOException {
     namesystem.rollFSImage();
     namesystem.rollFSImage();
   }
   }
@@ -1150,9 +1153,11 @@ public class NameNode implements ClientProtocol, DatanodeProtocol,
       case FORMAT:
       case FORMAT:
         boolean aborted = format(conf, true);
         boolean aborted = format(conf, true);
         System.exit(aborted ? 1 : 0);
         System.exit(aborted ? 1 : 0);
+        return null; // avoid javac warning
       case FINALIZE:
       case FINALIZE:
         aborted = finalize(conf, true);
         aborted = finalize(conf, true);
         System.exit(aborted ? 1 : 0);
         System.exit(aborted ? 1 : 0);
+        return null; // avoid javac warning
       case BACKUP:
       case BACKUP:
       case CHECKPOINT:
       case CHECKPOINT:
         return new BackupNode(conf, startOpt.toNodeRole());
         return new BackupNode(conf, startOpt.toNodeRole());