[ https://issues.apache.org/jira/browse/HDFS-12117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wellington Chevreuil updated HDFS-12117: ---------------------------------------- Attachment: HDFS-12117.006.patch Thanks for the suggestions [~jojochuang]! Attaching a new patch with the Client side tests added as suggested. While implementing these, I noticed that *LocalFileSystem* currently has no support for snapshot related methods. I'm not sure if that's intended to be that way, or should we add support for this as well? *TestHttpFSFileSystemLocalFileSystem* would fail when trying to run snapshot related methods defined on *BaseTestHttpFSWith*, so for now, these tests would only really run if *FileSystem* implementation is different from *LocalFileSystem*. For example, rename snapshot test: {noformat} private void testRenameSnapshot() throws Exception { if (!this.isLocalFS()) { Path snapshottablePath = new Path("/tmp/tmp-snap-test"); createSnapshotTestsPreconditions(snapshottablePath); //Now get the FileSystem instance that's being tested FileSystem fs = this.getHttpFSFileSystem(); fs.createSnapshot(snapshottablePath, "snap-to-rename"); fs.renameSnapshot(snapshottablePath, "snap-to-rename", "snap-new-name"); Path snapshotsDir = new Path("/tmp/tmp-snap-test/.snapshot"); FileStatus[] snapshotItems = fs.listStatus(snapshotsDir); assertTrue("Should have exactly one snapshot.", snapshotItems.length == 1); String resultingSnapName = snapshotItems[0].getPath().getName(); assertTrue("Snapshot name is not same as passed name.", "snap-new-name".equals(resultingSnapName)); cleanSnapshotTests(snapshottablePath, resultingSnapName); } } {noformat} > HttpFS does not seem to support SNAPSHOT related methods for WebHDFS REST > Interface > ----------------------------------------------------------------------------------- > > Key: HDFS-12117 > URL: https://issues.apache.org/jira/browse/HDFS-12117 > Project: Hadoop HDFS > Issue Type: New Feature > Components: httpfs > Affects Versions: 3.0.0-alpha3 > Reporter: Wellington Chevreuil > Assignee: Wellington Chevreuil > Attachments: HDFS-12117.003.patch, HDFS-12117.004.patch, > HDFS-12117.005.patch, HDFS-12117.006.patch, HDFS-12117.patch.01, > HDFS-12117.patch.02 > > > Currently, HttpFS is lacking implementation for SNAPSHOT related methods from > WebHDFS REST interface as defined by WebHDFS documentation [WebHDFS > documentation|https://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#Snapshot_Operations] > I would like to work on this implementation, following the existing design > approach already implemented by other WebHDFS methods on current HttpFS > project, so I'll be proposing an initial patch soon for reviews. > -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org