adelapena commented on code in PR #2420:
URL: https://github.com/apache/cassandra/pull/2420#discussion_r1243493717
##########
src/java/org/apache/cassandra/io/sstable/SSTableZeroCopyWriter.java:
##########
@@ -195,14 +197,15 @@ public void close()
writer.close();
}
- public void writeComponent(Component.Type type, DataInputPlus in, long
size) throws ClosedChannelException
+ public void writeComponent(Component component, DataInputPlus in, long
size) throws ClosedChannelException
{
- logger.info("Writing component {} to {} length {}", type,
componentWriters.get(type).getPath(), prettyPrintMemory(size));
+ SequentialWriter writer = componentWriters.get(component.name);
Review Comment:
You can add `@SuppressWarnings("resource")` with a brief comment about where
it will be closed. We have a bunch of those, for example [this
one](https://github.com/apache/cassandra/blob/eda0bcbefaf38e4069ac6db3a00937d778090083/src/java/org/apache/cassandra/service/reads/range/RangeCommands.java#L55).
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]