jojochuang commented on a change in pull request #3322:
URL: https://github.com/apache/hadoop/pull/3322#discussion_r694685317
##########
File path:
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/fs/http/client/BaseTestHttpFSWith.java
##########
@@ -1948,4 +1952,30 @@ public void testStoragePolicySatisfier() throws
Exception {
dfs.delete(path1, true);
}
}
+
+ private void testGetFileBlockLocations() throws Exception {
+ BlockLocation[] locations1, locations2 = null;
+ Path testFile = null;
+ if (!this.isLocalFS()) {
+ FileSystem fs = this.getHttpFSFileSystem();
+ testFile = new Path(getProxiedFSTestDir(), "singleBlock.txt");
+ DFSTestUtil.createFile(fs, testFile, (long) 1, (short) 1, 0L);
+ if (fs instanceof HttpFSFileSystem) {
+ HttpFSFileSystem httpFS = (HttpFSFileSystem) fs;
+ locations1 = httpFS.getFileBlockLocations(testFile, 0, 1);
+ Assert.assertNotNull(locations1);
+
+ // TODO: add test for HttpFSFileSystem.toBlockLocations()
Review comment:
this is my bad. I thought i added the test. Will update in the next
revision.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]