ctubbsii commented on a change in pull request #369: [ACCUMULO-4787] Close
input stream in AccumuloReplicaSystem
URL: https://github.com/apache/accumulo/pull/369#discussion_r167678913
##########
File path:
server/tserver/src/main/java/org/apache/accumulo/tserver/replication/AccumuloReplicaSystem.java
##########
@@ -370,11 +368,112 @@ protected Status replicateLogs(ClientContext
peerContext, final HostAndPort peer
log.debug("Replication WAL to peer tserver");
final Set<Integer> tids;
- final DataInputStream input;
- Span span = Trace.start("Read WAL header");
- span.data("file", p.toString());
- try {
- input = getWalStream(p);
+ try (final FSDataInputStream fsinput = fs.open(p); final DataInputStream
input = getWalStream(p, fsinput)) {
Review comment:
That might be configurable. Would have to investigate the options in newer
Eclipse versions. It doesn't matter to me... if it's configurable, I'll defer
to others as to what is most readable.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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