[
https://issues.apache.org/jira/browse/HDFS-5196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13942342#comment-13942342
]
Haohui Mai commented on HDFS-5196:
----------------------------------
The patch mostly looks good.
{code}
+ public static class Bean {...
{code}
Do you think it makes sense to move both definitions of the beans to
{{SnapshotStatsMXBean}}? You can convert the constructor into a function. For
example:
{code}
private static SnapshotDirectoryMXBean toBean(SnapshottableDirectoryStatus s) {
return new SnapshotDirectoryMXBean(...);
}
{code}
{code}
+ /**
+ * @return The number of snapshottale directories in the system
+ */
+ public int getNumSnapshottableDirs();
+
+ /**
+ * @return The number of directories that have been snapshotted
+ */
+ public int getNumSnapshots();
{code}
Since the code now returns the full lists of snapshottable directories and the
snapshots. I think we can get rid of these two calls. I think you can either
get rid of the count on the UI, or use a helper to count them (since the
{{size}} helper in dustjs looks buggy). It's your call.
{code}
+ 'permission_tostring' : function(v) {
+ var p = ['---', '--x', '-w-', '-wx', 'r--', 'r-x', 'rw-', 'rwx'];
+ return p[(v >>> 6) & 7] + p[(v >>> 3) & 7] + p[v & 7];
}
{code}
Let's move the function {{helper_to_permission}} from {{explorer.js}} here and
use it instead.
It might be worthwhile to bring back the unit test in the v6 patch.
nit: there are a few places that have trailing whitespaces.
> 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.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)