You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/12/09 12:39:13 UTC

[GitHub] [hadoop] steveloughran commented on a change in pull request #2168: HADOOP-16202. Enhance/Stabilize openFile()

steveloughran commented on a change in pull request #2168:
URL: https://github.com/apache/hadoop/pull/2168#discussion_r539272392



##########
File path: hadoop-common-project/hadoop-common/src/site/markdown/filesystem/openfile.md
##########
@@ -0,0 +1,290 @@
+<!---
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. See accompanying LICENSE file.
+-->
+
+# `openFile()`
+
+Create a builder to open a file, supporting options
+both standard and filesystem specific. The return

Review comment:
       The API lets you declare options that MUST be understood by the FS, vs those which can be ignored. All the new standard options fit into the "must" category as recognised options -they just don't have any sig
   
   ```java
   Future<FSDataInputStream> f = openFile(path)
     .must("fs.opt.seek-policy-option-name", "random, adaptive") 
     .opt("fs.azure.readahead", 312L)   // ignored on other stores. If you made it a must() opt then reading other stores MUST fail
     .build();
   
   FSDataInputStream is = f.get();
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org