فهرست منبع

HADOOP-5866. Move DeprecatedUTF8 from o.a.h.io to o.a.h.hdfs since it may
not be used outside hdfs. (Raghu Angadi)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@776438 13f79535-47bb-0310-9956-ffa450edef68

Raghu Angadi 16 سال پیش
والد
کامیت
8f691b6427

+ 3 - 0
CHANGES.txt

@@ -367,6 +367,9 @@ Trunk (unreleased changes)
     HADOOP-5858. Eliminate UTF8 and fix warnings in test/hdfs-with-mr package.
     (shv)
 
+    HADOOP-5866. Move DeprecatedUTF8 from o.a.h.io to o.a.h.hdfs since it may
+    not be used outside hdfs. (Raghu Angadi)
+
   OPTIMIZATIONS
 
     HADOOP-5595. NameNode does not need to run a replicator to choose a

+ 10 - 8
src/core/org/apache/hadoop/io/DeprecatedUTF8.java → src/hdfs/org/apache/hadoop/hdfs/DeprecatedUTF8.java

@@ -16,21 +16,23 @@
  * limitations under the License.
  */
 
-package org.apache.hadoop.io;
+package org.apache.hadoop.hdfs;
 
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
 /**
- * Wrapper for {@link UTF8}.
+ * A simple wrapper around {@link org.apache.hadoop.io.UTF8}.
  * This class should be used only when it is absolutely necessary
- * to use {@link UTF8}. The only difference is that using this class
- * does not require "@SuppressWarning" annotation to avoid javac warning. 
- * Instead the deprecation is implied in the class name.
+ * to use {@link org.apache.hadoop.io.UTF8}. The only difference is that 
+ * using this class does not require "@SuppressWarning" annotation to avoid 
+ * javac warning. Instead the deprecation is implied in the class name.
+ * 
+ * This should be treated as package private class to HDFS.
  */
 @SuppressWarnings("deprecation")
-public class DeprecatedUTF8 extends UTF8 {
+public class DeprecatedUTF8 extends org.apache.hadoop.io.UTF8 {
   
   public DeprecatedUTF8() {
     super();
@@ -51,10 +53,10 @@ public class DeprecatedUTF8 extends UTF8 {
    */
   
   public static String readString(DataInput in) throws IOException {
-    return UTF8.readString(in);
+    return org.apache.hadoop.io.UTF8.readString(in);
   }
   
   public static int writeString(DataOutput out, String s) throws IOException {
-    return UTF8.writeString(out, s);
+    return org.apache.hadoop.io.UTF8.writeString(out, s);
   }
 }

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/protocol/DatanodeID.java

@@ -22,7 +22,7 @@ import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
 
-import org.apache.hadoop.io.DeprecatedUTF8;
+import org.apache.hadoop.hdfs.DeprecatedUTF8;
 import org.apache.hadoop.io.WritableComparable;
 
 /**

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/common/Storage.java

@@ -767,7 +767,7 @@ public abstract class Storage extends StorageInfo {
   
     file.seek(0);
     file.writeInt(FSConstants.LAYOUT_VERSION);
-    org.apache.hadoop.io.DeprecatedUTF8.writeString(file, "");
+    org.apache.hadoop.hdfs.DeprecatedUTF8.writeString(file, "");
     file.writeBytes(messageForPreUpgradeVersion);
     file.getFD().sync();
   }

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/DatanodeDescriptor.java

@@ -29,7 +29,7 @@ import org.apache.hadoop.hdfs.server.namenode.BlocksMap.BlockInfo;
 import org.apache.hadoop.hdfs.server.protocol.BlockCommand;
 import org.apache.hadoop.hdfs.server.protocol.DatanodeProtocol;
 import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.DeprecatedUTF8;
+import org.apache.hadoop.hdfs.DeprecatedUTF8;
 import org.apache.hadoop.io.WritableUtils;
 
 /**************************************************

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java

@@ -43,7 +43,7 @@ import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeRegistration;
 import org.apache.hadoop.io.ArrayWritable;
 import org.apache.hadoop.io.LongWritable;
-import org.apache.hadoop.io.DeprecatedUTF8;
+import org.apache.hadoop.hdfs.DeprecatedUTF8;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableFactories;
 import org.apache.hadoop.io.WritableFactory;

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java

@@ -61,7 +61,7 @@ import org.apache.hadoop.hdfs.server.protocol.CheckpointCommand;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeCommand;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol;
 import org.apache.hadoop.hdfs.server.protocol.NamenodeRegistration;
-import org.apache.hadoop.io.DeprecatedUTF8;
+import org.apache.hadoop.hdfs.DeprecatedUTF8;
 import org.apache.hadoop.io.Writable;
 
 /**

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/protocol/NamespaceInfo.java

@@ -25,7 +25,7 @@ import java.io.IOException;
 import org.apache.hadoop.hdfs.protocol.FSConstants;
 import org.apache.hadoop.hdfs.server.common.Storage;
 import org.apache.hadoop.hdfs.server.common.StorageInfo;
-import org.apache.hadoop.io.DeprecatedUTF8;
+import org.apache.hadoop.hdfs.DeprecatedUTF8;
 import org.apache.hadoop.io.Writable;
 import org.apache.hadoop.io.WritableFactories;
 import org.apache.hadoop.io.WritableFactory;