adamantal commented on a change in pull request #568: HADOOP-15691 Add
PathCapabilities to FS and FC to complement StreamCapabilities
URL: https://github.com/apache/hadoop/pull/568#discussion_r295738356
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/http/AbstractHttpFileSystem.java
##########
@@ -111,6 +114,21 @@ public FileStatus getFileStatus(Path path) throws
IOException {
return new FileStatus(-1, false, 1, DEFAULT_BLOCK_SIZE, 0, path);
}
+ /**
+ * Declare that this filesystem connector is always read only.
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean hasPathCapability(final Path path, final String capability)
+ throws IOException {
+ switch (validatePathCapabilityArgs(path, capability)) {
+ case CommonPathCapabilities.FS_READ_ONLY_CONNECTOR:
+ return true;
+ default:
+ return false;
Review comment:
Shouldn't we use `super.hasPathCapability(path, capability)` here?
It would delegate to FileSystem's call, so effectively no difference
(including the `supportAcls()` call there), but would be cleaner.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]