Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ced547d5f -> d87a92bf5


HDFS-12251. Add document for StreamCapabilities. (Lei (Eddy) Xu)

(cherry picked from commit fe3341786a0d61f404127bf21d1afc85b2f21d38)

Conflicts:
        hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSErasureCoding.md


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d87a92bf
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d87a92bf
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d87a92bf

Branch: refs/heads/branch-2
Commit: d87a92bf557c988d6623063a6916f7a4b093a49e
Parents: ced547d
Author: Lei Xu <[email protected]>
Authored: Fri Aug 4 11:21:58 2017 -0700
Committer: Lei Xu <[email protected]>
Committed: Fri Aug 4 11:25:21 2017 -0700

----------------------------------------------------------------------
 .../src/site/markdown/filesystem/filesystem.md  | 24 ++++++++++++++++++++
 1 file changed, 24 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d87a92bf/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
 
b/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
index b87ee4c..21209bd 100644
--- 
a/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
+++ 
b/hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md
@@ -1199,3 +1199,27 @@ try {
 It is notable that this is *not* done in the Hadoop codebase. This does not 
imply
 that robust loops are not recommended —more that the concurrency
 problems were not considered during the implementation of these loops.
+
+
+## <a name="StreamCapability"></a> interface `StreamCapabilities`
+
+The `StreamCapabilities` provides a way to programmatically query the
+capabilities that an `OutputStream` supports.
+
+```java
+public interface StreamCapabilities {
+  boolean hasCapability(String capability);
+}
+```
+
+### `boolean hasCapability(capability)`
+
+Return true if the `OutputStream` has the desired capability.
+
+The caller can query the capabilities of a stream using a string value.
+It currently supports to query:
+
+ * `StreamCapabilties.HFLUSH` ("*hflush*"): the capability to flush out the 
data
+ in client's buffer.
+ * `StreamCapabilities.HSYNC` ("*hsync*"): capability to flush out the data in
+ client's buffer and the disk device.
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to