Permalink
Browse files

First version

  • Loading branch information...
1 parent 1de5e76 commit 9d7d85b3b9d36f6edcb918fe4ea6a97be4ce66a4 @rbpark committed Mar 17, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 azkaban/src/java/azkaban/web/pages/HdfsBrowserServlet.java
@@ -139,7 +139,6 @@ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
Properties property = prop.toProperties();
String user = getParam(req, "login");
- setCookieInResponse(resp, SESSION_ID_NAME, user);
UserGroupInformation ugi = SecurityUtils.getProxiedUser(user, property, logger);
FileSystem fs = ugi.doAs(new PrivilegedAction<FileSystem>(){
@Override
@@ -151,6 +150,7 @@ public FileSystem run() {
}
}});
+ setCookieInResponse(resp, SESSION_ID_NAME, user);
try {
handleFSDisplay(fs, user, req, resp);
} catch (IOException e) {
@@ -214,6 +214,9 @@ private void displayDir(FileSystem fs, String user, HttpServletRequest req, Http
catch (AccessControlException e) {
page.add("error", "Permission denied. User cannot read file or directory");
}
+ catch (IOException e) {
+ page.add("error", e.getMessage());
+ }
page.render();
}

0 comments on commit 9d7d85b

Please sign in to comment.