-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-13327 Output Stream Specification. #1694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-13327 Output Stream Specification. #1694
Conversation
1431540
to
5237cd1
Compare
### HDFS and `OutputStream.close()` | ||
|
||
HDFS does not immediately `sync()` the output of a written file to disk on | ||
`OutputStream.close()` unless configured with `dfs.datanode.synconclose` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
``` | ||
|
||
HDFS does not do this except when the write crosses a block boundary; to do | ||
otherwise would overload the Namenode. Other stores MAY copy this behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
When an output stream in HDFS is closed; the newly written data is not immediately | ||
written to disk unless HDFS is deployed with `dfs.datanode.synconclose` set to | ||
true. Otherwise it is cached and written to disk later. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
### `StreamCapabilities` | ||
|
||
Implementors of filesystem clients SHOULD implement the `StreamCapabilities` | ||
interface and its `hasCapabilities()` method to to declare whether or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace:end of line
💔 -1 overall
This message was automatically generated. |
|
||
/** | ||
* Probe for an object having a capability; returns true | ||
* iff the stream implements {@link StreamCapabilities} and its |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo? there are several iff
in this doc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"if and only if"; CS term. I think I mention it somewhere -if not I should. It's used to be absolutely clear that if the condition is not met then the outcome is blocked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can cut it from the javadocs & leave in the markdown files, as they are the stricter bits of work
This PR removes the changes related to S3A output stream lifecycle, so only covers the specification of Syncable and ensures that StreamCapabilities passes all the way through to the final implementation classes. All streams which implement Syncable hsync/hflush declare this in their stream capabilities Change-Id: I82b16a8e0965f34eb0c42504da43e8fbeabcb68c
Change-Id: Id38cf27639215abdd0d8c3578ddf72ed7adca8c5
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
Review with more on 404 caching. Change-Id: Ib474a84e48556c6b76121427a026fa854b5bd9e0
5237cd1
to
c17cf2e
Compare
closing to rebase and resubmit |
rebased to #2102 |
This PR removes the changes related to S3A output stream lifecycle,
so only covers the specification of Syncable and ensures that StreamCapabilities
passes all the way through to the final implementation classes.
All streams which implement Syncable hsync/hflush declare this in their stream capabilities
Supercedes #575
Change-Id: I82b16a8e0965f34eb0c42504da43e8fbeabcb68c