HDFS-5935. Merge change r1570663 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1570664 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jing Zhao 2014-02-21 18:57:41 +00:00
parent 555d4b513f
commit fc5238cd1f
2 changed files with 20 additions and 4 deletions

View File

@ -95,6 +95,9 @@ Release 2.4.0 - UNRELEASED
HDFS-5868. Make hsync implementation pluggable on the DataNode.
(Buddy Taylor via Arpit Agarwal)
HDFS-5935. New Namenode UI FS browser should throw smarter error messages.
(Travis Thompson via jing9)
OPTIMIZATIONS
HDFS-5790. LeaseManager.findPath is very slow when many leases need recovery

View File

@ -66,9 +66,22 @@
function network_error_handler(url) {
return function (jqxhr, text, err) {
var msg = '<p>Failed to retreive data from ' + url + ', cause: ' + err + '</p>';
if (url.indexOf('/webhdfs/v1') === 0) {
msg += '<p>WebHDFS might be disabled. WebHDFS is required to browse the filesystem.</p>';
switch(jqxhr.status) {
case 401:
var msg = '<p>Authentication failed when trying to open ' + url + ': Unauthrozied.</p>';
break;
case 403:
if(jqxhr.responseJSON !== undefined && jqxhr.responseJSON.RemoteException !== undefined) {
var msg = '<p>' + jqxhr.responseJSON.RemoteException.message + "</p>";
break;
}
var msg = '<p>Permission denied when trying to open ' + url + ': ' + err + '</p>';
break;
case 404:
var msg = '<p>Path does not exist on HDFS or WebHDFS is disabled. Please check your path or enable WebHDFS</p>';
break;
default:
var msg = '<p>Failed to retreive data from ' + url + ': ' + err + '</p>';
}
show_err_msg(msg);
};