HDFS-6140. Merging change r1580173 from trunk to branch-2.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1580174 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2014-03-22 05:39:49 +00:00
parent 3f32bb0e7f
commit 6006427e9f
3 changed files with 5 additions and 3 deletions

View File

@ -427,6 +427,9 @@ Release 2.4.0 - UNRELEASED
HDFS-6131. Move HDFSHighAvailabilityWithNFS.apt.vm and HDFS-6131. Move HDFSHighAvailabilityWithNFS.apt.vm and
HDFSHighAvailabilityWithQJM.apt.vm from Yarn to HDFS. (jing9) HDFSHighAvailabilityWithQJM.apt.vm from Yarn to HDFS. (jing9)
HDFS-6140. WebHDFS cannot create a file with spaces in the name after HA
failover changes. (cnauroth)
BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS
HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9) HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9)

View File

@ -247,8 +247,7 @@ public class DatanodeWebHdfsMethods {
} }
final String scheme = "http".equals(request.getScheme()) ? final String scheme = "http".equals(request.getScheme()) ?
WebHdfsFileSystem.SCHEME : SWebHdfsFileSystem.SCHEME; WebHdfsFileSystem.SCHEME : SWebHdfsFileSystem.SCHEME;
final URI uri = URI.create(String.format("%s://%s/%s", scheme, final URI uri = new URI(scheme, nnId, fullpath, null, null);
nnId, fullpath));
return Response.created(uri).type(MediaType.APPLICATION_OCTET_STREAM).build(); return Response.created(uri).type(MediaType.APPLICATION_OCTET_STREAM).build();
} }
default: default:

View File

@ -504,7 +504,7 @@ public class TestWebHdfsFileSystemContract extends FileSystemContractBaseTest {
{//test create with path containing spaces {//test create with path containing spaces
HttpOpParam.Op op = PutOpParam.Op.CREATE; HttpOpParam.Op op = PutOpParam.Op.CREATE;
Path path = new Path("/test/path%20with%20spaces"); Path path = new Path("/test/path with spaces");
URL url = webhdfs.toUrl(op, path); URL url = webhdfs.toUrl(op, path);
HttpURLConnection conn = (HttpURLConnection)url.openConnection(); HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod(op.getType().toString()); conn.setRequestMethod(op.getType().toString());