HDFS-5935. New Namenode UI FS browser should throw smarter error messages. Cotributed by Travis Thompson.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1570663 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58fb83d982
commit
c324f3096f
|
@ -424,6 +424,9 @@ Release 2.4.0 - UNRELEASED
|
|||
HDFS-5775. Consolidate the code for serialization in CacheManager
|
||||
(Haohui Mai via brandonli)
|
||||
|
||||
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
|
||||
|
|
|
@ -66,10 +66,23 @@
|
|||
|
||||
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);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue