sunhelly commented on a change in pull request #4174:
URL: https://github.com/apache/hbase/pull/4174#discussion_r825958716
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/FSHLogProvider.java
##########
@@ -90,13 +90,6 @@ public static Writer createWriter(final Configuration conf,
final FileSystem fs,
} else {
LOG.debug("Error instantiating log writer.", e);
}
- if (writer != null) {
Review comment:
@GeorryHuang The closeOutput() is an abstract method in the
AbstractProtobufLogWriter, so each writer should implement this method. And it
is used in the init() method, like here, the init method has already called
closeOutput() to close the broken stream, so no need to call Writer.close() in
the catch parentheses.
Do not call Writer.close() here can also avoid to write trailer to the
broken wal, this is another purpose of this issue.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]