[ 
https://issues.apache.org/jira/browse/HDFS-9057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902489#comment-14902489
 ] 

Vinayakumar B commented on HDFS-9057:
-------------------------------------

Thanks [~brahmareddy], 

Some comments about the patch below.

1. Indentation should be corrected in below changes.
{code}+      case ALLOWSNAPSHOT : {
+        np.allowSnapshot(fullpath);
+        return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();
+      }{code}
{code}+      case DISALLOWSNAPSHOT : {
+        np.disallowSnapshot(fullpath);
+        return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();
+      }{code}

2. No need of typecasting to WebHdfsFileSystem everytime in tests. 
{{WebHdfsTestUtil.getWebHdfsFileSystem(conf,WebHdfsConstants.WEBHDFS_SCHEME)}} 
returns instance of {{WebHdfsFileSystem}} itself. So you can store it as 
{{WebHdfsFileSystem webhdfs = 
WebHdfsTestUtil.getWebHdfsFileSystem(conf,WebHdfsConstants.WEBHDFS_SCHEME)}}.
 And avoid all typecasting for allow/disallow snapshot calls.


> allow/disallow snapshots via webhdfs
> ------------------------------------
>
>                 Key: HDFS-9057
>                 URL: https://issues.apache.org/jira/browse/HDFS-9057
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: webhdfs
>    Affects Versions: 3.0.0
>            Reporter: Allen Wittenauer
>            Assignee: Brahma Reddy Battula
>         Attachments: HDFS-9057.patch
>
>
> We should be able to allow and disallow directories for snapshotting via 
> WebHDFS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to