Author: cutting
Date: Fri Sep 30 18:01:27 2011
New Revision: 1177757
URL: http://svn.apache.org/viewvc?rev=1177757&view=rev
Log:
HDFS-2298. Fix TestDfsOverAvroRpc by changing ClientProtocol to not include multiple methods
of the same name.
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1177757&r1=1177756&r2=1177757&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Sep 30 18:01:27 2011
@@ -88,6 +88,9 @@ Trunk (unreleased changes)
HDFS-2361. hftp is broken, fixed username checks in JspHelper. (jitendra)
+ HDFS-2298. Fix TestDfsOverAvroRpc by changing ClientProtocol to
+ not include multiple methods of the same name. (cutting)
+
Release 0.23.0 - Unreleased
INCOMPATIBLE CHANGES
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java?rev=1177757&r1=1177756&r2=1177757&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
Fri Sep 30 18:01:27 2011
@@ -874,13 +874,13 @@ public class DFSClient implements java.i
}
/**
* Rename file or directory.
- * @see ClientProtocol#rename(String, String, Options.Rename...)
+ * @see ClientProtocol#rename2(String, String, Options.Rename...)
*/
public void rename(String src, String dst, Options.Rename... options)
throws IOException {
checkOpen();
try {
- namenode.rename(src, dst, options);
+ namenode.rename2(src, dst, options);
} catch(RemoteException re) {
throw re.unwrapRemoteException(AccessControlException.class,
DSQuotaExceededException.class,
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java?rev=1177757&r1=1177756&r2=1177757&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java
Fri Sep 30 18:01:27 2011
@@ -67,9 +67,9 @@ public interface ClientProtocol extends
* Compared to the previous version the following changes have been introduced:
* (Only the latest change is reflected.
* The log of historical changes can be retrieved from the svn).
- * 68: Add Balancer Bandwidth Command protocol
+ * 69: Eliminate overloaded method names.
*/
- public static final long versionID = 68L;
+ public static final long versionID = 69L;
///////////////////////////////////////
// File contents
@@ -419,7 +419,7 @@ public interface ClientProtocol extends
* <code>dst</code> contains a symlink
* @throws IOException If an I/O error occurred
*/
- public void rename(String src, String dst, Options.Rename... options)
+ public void rename2(String src, String dst, Options.Rename... options)
throws AccessControlException, DSQuotaExceededException,
FileAlreadyExistsException, FileNotFoundException,
NSQuotaExceededException, ParentNotDirectoryException, SafeModeException,
@@ -428,21 +428,6 @@ public interface ClientProtocol extends
/**
* Delete the given file or directory from the file system.
* <p>
- * Any blocks belonging to the deleted files will be garbage-collected.
- *
- * @param src existing name.
- * @return true only if the existing file or directory was actually removed
- * from the file system.
- * @throws UnresolvedLinkException if <code>src</code> contains a symlink.
- * @deprecated use {@link #delete(String, boolean)} istead.
- */
- @Deprecated
- public boolean delete(String src)
- throws IOException, UnresolvedLinkException;
-
- /**
- * Delete the given file or directory from the file system.
- * <p>
* same as delete but provides a way to avoid accidentally
* deleting non empty directories programmatically.
* @param src existing name
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java?rev=1177757&r1=1177756&r2=1177757&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java
Fri Sep 30 18:01:27 2011
@@ -523,7 +523,7 @@ class NameNodeRpcServer implements Namen
}
@Override // ClientProtocol
- public void rename(String src, String dst, Options.Rename... options)
+ public void rename2(String src, String dst, Options.Rename... options)
throws IOException {
if(stateChangeLog.isDebugEnabled()) {
stateChangeLog.debug("*DIR* NameNode.rename: " + src + " to " + dst);
@@ -536,12 +536,6 @@ class NameNodeRpcServer implements Namen
metrics.incrFilesRenamed();
}
- @Deprecated
- @Override // ClientProtocol
- public boolean delete(String src) throws IOException {
- return delete(src, true);
- }
-
@Override // ClientProtocol
public boolean delete(String src, boolean recursive) throws IOException {
if (stateChangeLog.isDebugEnabled()) {
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java?rev=1177757&r1=1177756&r2=1177757&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
(original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java
Fri Sep 30 18:01:27 2011
@@ -257,7 +257,7 @@ public class NamenodeWebHdfsMethods {
final String js = JsonUtil.toJsonString(PutOpParam.Op.RENAME, b);
return Response.ok(js).type(MediaType.APPLICATION_JSON).build();
} else {
- np.rename(fullpath, dstPath.getValue(),
+ np.rename2(fullpath, dstPath.getValue(),
s.toArray(new Options.Rename[s.size()]));
return Response.ok().type(MediaType.APPLICATION_JSON).build();
}
|