HDFS-6140. WebHDFS cannot create a file with spaces in the name after HA failover changes. Contributed by Chris Nauroth.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1580173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62d28901d6
commit
00ceaade05
|
@ -668,6 +668,9 @@ Release 2.4.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-6127. WebHDFS tokens cannot be renewed in HA setup. (wheat9)
|
HDFS-6127. WebHDFS tokens cannot be renewed in HA setup. (wheat9)
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue