jnp commented on a change in pull request #749: HDDS-1395. Key write fails with
BlockOutputStream has been closed exception
URL: https://github.com/apache/hadoop/pull/749#discussion_r277862815
##########
File path:
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java
##########
@@ -574,14 +574,18 @@ public void cleanup(boolean invalidateClient) {
* @throws IOException if stream is closed
*/
private void checkOpen() throws IOException {
- if (xceiverClient == null) {
+ if (isClosed()) {
throw new IOException("BlockOutputStream has been closed.");
} else if (getIoException() != null) {
adjustBuffersOnException();
throw getIoException();
}
}
+ public boolean isClosed() {
Review comment:
This need not be public. If you need it for testing, please annotate.
----------------------------------------------------------------
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]