DaveTeng0 commented on code in PR #5530:
URL: https://github.com/apache/ozone/pull/5530#discussion_r1385592622
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java:
##########
@@ -709,4 +709,23 @@ private void checkNotClosed() throws IOException {
+ blockOutputStreamEntryPool.getKeyName());
}
}
+
+ protected BlockOutputStreamEntryPool getBlockOutputStreamEntryPool() {
+ return blockOutputStreamEntryPool;
+ }
+
+ protected void setBlockOutputStreamEntryPool(
+ BlockOutputStreamEntryPool streamEntryPool) {
+ blockOutputStreamEntryPool = streamEntryPool;
+ }
+
+ public void setExcludeList(ExcludeList excludeList) {
+ blockOutputStreamEntryPool.setExcludeList(excludeList);
+ }
+
+ protected int getDataWritten(BlockOutputStreamEntry current,
Review Comment:
I guess that this method will only return data written by current block is
actually correct.
Since in order to mock the result in test, what I did is just to extract the
original code from line 274 here
(https://github.com/apache/ozone/blob/master/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java#L274)
out to an independent method, without any other changes.
And I also take a look at the logic in its caller method
"writeToOutputStream(BlockOutputStreamEntry current,
boolean retry, long len, byte[] b, int writeLen, int off, long
currentPos)", it does seem to be only for processing the current block, not
overall data.
--
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]