Author: omalley
Date: Fri Mar 4 03:51:55 2011
New Revision: 1077207
URL: http://svn.apache.org/viewvc?rev=1077207&view=rev
Log:
commit be24b49b0273c33536e3969c40c1d6d23b90c163
Author: Hairong Kuang <[email protected]>
Date: Tue Feb 23 21:50:36 2010 +0000
HDFS:946 from
http://issues.apache.org/jira/secure/attachment/12436769/HdfsFileStatusProxy-Yahoo20.patch
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
Modified:
hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
URL:
http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java?rev=1077207&r1=1077206&r2=1077207&view=diff
==============================================================================
---
hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
(original)
+++
hadoop/common/branches/branch-0.20-security-patches/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
Fri Mar 4 03:51:55 2011
@@ -23,8 +23,8 @@ import java.net.URISyntaxException;
import javax.servlet.http.HttpServletRequest;
-import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.hdfs.protocol.ClientProtocol;
+import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
import org.apache.hadoop.hdfs.server.namenode.FileDataServlet;
import org.apache.hadoop.security.UserGroupInformation;
@@ -35,12 +35,12 @@ public class ProxyFileDataServlet extend
/** {@inheritDoc} */
@Override
- protected URI createUri(FileStatus i, UserGroupInformation ugi,
+ protected URI createUri(String parent, HdfsFileStatus i,
UserGroupInformation ugi,
ClientProtocol nnproxy, HttpServletRequest request) throws IOException,
URISyntaxException {
return new URI(request.getScheme(), null, request.getServerName(), request
- .getServerPort(), "/streamFile", "filename=" + i.getPath() + "&ugi="
- + ugi.getShortUserName(), null);
+ .getServerPort(), "/streamFile", "filename=" + i.getFullName(parent)
+ + "&ugi=" + ugi.getShortUserName(), null);
}
/** {@inheritDoc} */