HDFS-3314. HttpFS operation for getHomeDirectory is incorrect. (tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1329715 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2012-04-24 13:46:25 +00:00
parent f9993b5ffb
commit f4711ef3ab
4 changed files with 6 additions and 4 deletions

View File

@ -159,7 +159,7 @@ public static FILE_TYPE getType(FileStatus fileStatus) {
* Get operations.
*/
public enum GetOpValues {
OPEN, GETFILESTATUS, LISTSTATUS, GETHOMEDIR, GETCONTENTSUMMARY, GETFILECHECKSUM,
OPEN, GETFILESTATUS, LISTSTATUS, GETHOMEDIRECTORY, GETCONTENTSUMMARY, GETFILECHECKSUM,
GETDELEGATIONTOKEN, GETFILEBLOCKLOCATIONS, INSTRUMENTATION
}
@ -684,7 +684,7 @@ public FileStatus getFileStatus(Path f) throws IOException {
@Override
public Path getHomeDirectory() {
Map<String, String> params = new HashMap<String, String>();
params.put(OP_PARAM, GetOpValues.GETHOMEDIR.toString());
params.put(OP_PARAM, GetOpValues.GETHOMEDIRECTORY.toString());
try {
HttpURLConnection conn = getConnection(HTTP_GET, params, new Path(getUri().toString(), "/"), false);
validateResponse(conn, HttpURLConnection.HTTP_OK);

View File

@ -291,7 +291,7 @@ public Response get(@Context Principal user,
response = Response.ok(json).type(MediaType.APPLICATION_JSON).build();
break;
}
case GETHOMEDIR: {
case GETHOMEDIRECTORY: {
FSOperations.FSHomeDir command = new FSOperations.FSHomeDir();
JSONObject json = fsExecute(user, doAs.value(), command);
AUDIT_LOG.info("");

View File

@ -53,7 +53,7 @@ public void postUploadWrong() throws Exception {
@Test
public void getOther() throws Exception {
test("GET", HttpFSFileSystem.GetOpValues.GETHOMEDIR.toString(), "plain/text", false, false);
test("GET", HttpFSFileSystem.GetOpValues.GETHOMEDIRECTORY.toString(), "plain/text", false, false);
}
@Test

View File

@ -551,6 +551,8 @@ Release 2.0.0 - UNRELEASED
HDFS-3305. GetImageServlet should consider SBN a valid requestor in a
secure HA setup. (atm)
HDFS-3314. HttpFS operation for getHomeDirectory is incorrect. (tucu)
BREAKDOWN OF HDFS-1623 SUBTASKS
HDFS-2179. Add fencing framework and mechanisms for NameNode HA. (todd)