Skip to content

Commit 835b907

Browse files
committed
HADOOP-13327 review of more of Sean Busbey's comments
TODO "Could this be in a section about visibility and not in the model definition? Maybe later. "here's the model, here's how that model works with creation, here's how it works when reading/writing" flows much better and visibility should be in that third part." Change-Id: I61c89475a1ea72006524803f2a7dd9e40551d718
1 parent 81a7387 commit 835b907

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

hadoop-common-project/hadoop-common/src/site/markdown/filesystem/filesystem.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,8 @@ The updated (valid) FileSystem must contains all the parent directories of the p
623623
The result is `FSDataOutputStream`, which through its operations may generate new filesystem states with updated values of
624624
`FS.Files[p]`
625625

626+
The behavior of the returned stream is covered in [Output](outputstream.html).
627+
626628
#### Implementation Notes
627629

628630
* Some implementations split the create into a check for the file existing
@@ -654,6 +656,8 @@ this precondition fails.
654656

655657
Make a `FSDataOutputStreamBuilder` to specify the parameters to create a file.
656658

659+
The behavior of the returned stream is covered in [Output](outputstream.html).
660+
657661
#### Implementation Notes
658662

659663
`createFile(p)` returns a `FSDataOutputStreamBuilder` only and does not make
@@ -685,11 +689,15 @@ Implementations without a compliant call SHOULD throw `UnsupportedOperationExcep
685689
Return: `FSDataOutputStream`, which can update the entry `FS.Files[p]`
686690
by appending data to the existing list.
687691

692+
The behavior of the returned stream is covered in [Output](outputstream.html).
693+
688694
### `FSDataOutputStreamBuilder appendFile(Path p)`
689695

690696
Make a `FSDataOutputStreamBuilder` to specify the parameters to append to an
691697
existing file.
692698

699+
The behavior of the returned stream is covered in [Output](outputstream.html).
700+
693701
#### Implementation Notes
694702

695703
`appendFile(p)` returns a `FSDataOutputStreamBuilder` only and does not make

hadoop-common-project/hadoop-common/src/site/markdown/filesystem/outputstream.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ FS'.Files(path) == buffer
9797
```
9898

9999
Any client reading the data at the path MUST see the new data.
100-
The two sync operations, `hflush()` and `hsync()` differ in their durability
100+
The `Syncable` operations differ in their durability
101101
guarantees, not visibility of data.
102102

103-
### State of Stream and Filesystem after `Filesystem.create()`
103+
### State of Stream and File System after `Filesystem.create()`
104104

105105
The output stream returned by a `FileSystem.create(path)` or
106-
`FileSystem.createFile(path).build`
106+
`FileSystem.createFile(path).build()` within a filesystem `FS`,
107107
can be modeled as a triple containing an empty array of no data:
108108

109109
```python
@@ -113,7 +113,7 @@ Stream' = (path, true, [])
113113
The filesystem `FS'` MUST contain a 0-byte file at the path:
114114

115115
```python
116-
data(FS', path) == []
116+
FS' = FS where data(FS', path) == []
117117
```
118118

119119
Thus, the initial state of `Stream'.buffer` is implicitly
@@ -122,10 +122,10 @@ consistent with the data at the filesystem.
122122

123123
*Object Stores*: see caveats in the "Object Stores" section below.
124124

125-
### State of Stream and Filesystem after `Filesystem.append()`
125+
### State of Stream and File System after `Filesystem.append()`
126126

127127
The output stream returned from a call of
128-
`FileSystem.append(path, buffersize, progress)`,
128+
`FileSystem.append(path, buffersize, progress)` within a filesystem `FS`,
129129
can be modelled as a stream whose `buffer` is intialized to that of
130130
the original file:
131131

@@ -149,7 +149,7 @@ After a call to `close()`, the stream is closed for all operations other
149149
than `close()`; they MAY fail with `IOException` or `RuntimeException`.
150150

151151
```python
152-
Stream' = (path, false, [])
152+
Stream' = (path, false, [])
153153
```
154154

155155
The `close()` operation MUST be idempotent with the sole attempt to write the

0 commit comments

Comments
 (0)