waitinfuture commented on code in PR #2348:
URL:
https://github.com/apache/incubator-celeborn/pull/2348#discussion_r1512128711
##########
client/src/main/java/org/apache/celeborn/client/read/CelebornInputStream.java:
##########
@@ -517,25 +511,37 @@ public int read(byte[] b, int off, int len) throws
IOException {
}
@Override
- public void close() {
- int locationsCount = locations.length;
- logger.debug(
- "total location count {} read {} skip {}",
- locationsCount,
- locationsCount - skipCount.sum(),
- skipCount.sum());
- if (currentChunk != null) {
- logger.debug("Release chunk {}", currentChunk);
- currentChunk.release();
- currentChunk = null;
- }
- if (currentReader != null) {
- logger.debug("Closing reader");
- currentReader.close();
- currentReader = null;
- }
- if (containLocalRead) {
- ShuffleClient.printReadStats(logger);
+ public synchronized void close() {
+ if (!closed) {
+ int locationsCount = locations.length;
+ logger.debug(
Review Comment:
done
--
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]