sumitagrawl commented on code in PR #5530:
URL: https://github.com/apache/ozone/pull/5530#discussion_r1384546145
##########
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) {
Review Comment:
no need expose setExcludeList and excludeList can be final.
BlockOutpputStreamEntryPool can return spy of excludeList itself.
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java:
##########
@@ -546,6 +546,7 @@ protected void handleFlush(boolean close) throws
IOException {
try {
handleFlushInternal(close);
} catch (ExecutionException e) {
+ failedServers.addAll(getPipeline().getNodes());
Review Comment:
it seems already exclusionList expiry handling is present, just added
another scenario here, right?
##########
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:
This method will give data written to only current block for which write in
progress, but will not give for overall data written.
Need use writeOffset OR can use
org.apache.hadoop.ozone.client.io.KeyOutputStream#getLocationInfoList() to
return all location and sum-up to get final written length.
##########
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(
Review Comment:
we can use @VisibleForTesting annotation as used in testcase
--
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]