You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-commits@hadoop.apache.org by ji...@apache.org on 2014/02/21 19:57:06 UTC
svn commit: r1570663 - in
/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt
src/main/webapps/hdfs/explorer.js
Author: jing9
Date: Fri Feb 21 18:57:06 2014
New Revision: 1570663
URL: http://svn.apache.org/r1570663
Log:
HDFS-5935. New Namenode UI FS browser should throw smarter error messages. Cotributed by Travis Thompson.
Modified:
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1570663&r1=1570662&r2=1570663&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Fri Feb 21 18:57:06 2014
@@ -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
Modified: hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js?rev=1570663&r1=1570662&r2=1570663&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js (original)
+++ hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/explorer.js Fri Feb 21 18:57:06 2014
@@ -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);
};
}