Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CC54711A8C for ; Mon, 24 Mar 2014 17:42:50 +0000 (UTC) Received: (qmail 50372 invoked by uid 500); 24 Mar 2014 17:42:46 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 50169 invoked by uid 500); 24 Mar 2014 17:42:44 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 50100 invoked by uid 99); 24 Mar 2014 17:42:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2014 17:42:43 +0000 Date: Mon, 24 Mar 2014 17:42:43 +0000 (UTC) From: "Haohui Mai (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-5196) Provide more snapshot information in WebUI MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-5196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13945405#comment-13945405 ] Haohui Mai commented on HDFS-5196: ---------------------------------- The patch generally looks good. There are some minor comments needed to be addressed: {code} + 'array_length' : function (v) { + var cnt = 0; + for (var i in v) { + cnt++; + } + return cnt; {code} You can follow what dust.js does (https://github.com/linkedin/dustjs/wiki/Dust-Tutorial#size_keyxxx___size_helper_Available_in_Dust_V11_release), and derives a new version that evaluates the key. Otherwise, I think that the following code will print {{Snapshottable directories:}} instead of {{Snapshottable directories:0}} {code} + {code} I guess for this version let's just remove {{array_length}} and {code} + + {code} Let's address it in a separate jira. {code} + var HELPERS = { + 'helper_to_permission': function (chunk, ctx, bodies, params) { + var p = ctx.current().permission; + var symbols = [ '---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx' ]; + var sticky = p > 1000; + + var res = ""; + res = symbols[(p >>> 6) & 7] + symbols[(p >>> 3) & 7] + symbols[p & 7]; + + if (sticky) { + var otherExec = ((ctx.current().permission % 10) & 1) == 1; + res = res.substr(0, res.length - 1) + (otherExec ? 't' : 'T'); + } + + chunk.write('d' + res); + return chunk; + } + }; + {code} You can move it to the filter object in {{dfs-dust.js}} and remove the duplicated one in {{explorer.js}}. Nit: there are some trailing white spaces. > Provide more snapshot information in WebUI > ------------------------------------------ > > Key: HDFS-5196 > URL: https://issues.apache.org/jira/browse/HDFS-5196 > Project: Hadoop HDFS > Issue Type: Improvement > Components: snapshots > Affects Versions: 3.0.0 > Reporter: Haohui Mai > Assignee: Shinichi Yamashita > Priority: Minor > Attachments: HDFS-5196-2.patch, HDFS-5196-3.patch, HDFS-5196-4.patch, HDFS-5196-5.patch, HDFS-5196-6.patch, HDFS-5196-7.patch, HDFS-5196-8.patch, HDFS-5196.patch, HDFS-5196.patch, HDFS-5196.patch, snapshot-new-webui.png, snapshottable-directoryList.png, snapshotteddir.png > > > The WebUI should provide more detailed information about snapshots, such as all snapshottable directories and corresponding number of snapshots (suggested in HDFS-4096). -- This message was sent by Atlassian JIRA (v6.2#6252)