adoroszlai commented on code in PR #6408:
URL: https://github.com/apache/ozone/pull/6408#discussion_r1531749272
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java:
##########
@@ -111,26 +112,32 @@ public class BlockInputStream extends
BlockExtendedInputStream {
private final Function<BlockID, BlockLocationInfo> refreshFunction;
+ @SuppressWarnings("checkstyle:ParameterNumber")
public BlockInputStream(BlockID blockId, long blockLen, Pipeline pipeline,
Token<OzoneBlockTokenIdentifier> token, boolean verifyChecksum,
XceiverClientFactory xceiverClientFactory,
- Function<BlockID, BlockLocationInfo> refreshFunction) {
+ Function<BlockID, BlockLocationInfo> refreshFunction,
+ OzoneClientConfig config) {
this.blockID = blockId;
this.length = blockLen;
setPipeline(pipeline);
tokenRef.set(token);
this.verifyChecksum = verifyChecksum;
Review Comment:
```suggestion
this.verifyChecksum = config.isChecksumVerify();
```
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/OzoneClientConfig.java:
##########
@@ -144,6 +144,23 @@ public enum ChecksumCombineMode {
tags = ConfigTag.CLIENT)
private int retryInterval = 0;
+ @Config(key = "max.read.retries",
Review Comment:
I think `read.max.retries` would be better. That way the pair of config
keys for read and write have the same suffix:
```
max.retries
retry.interval
```
and
```
read.max.retries
read.retry.interval
```
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java:
##########
@@ -111,26 +112,32 @@ public class BlockInputStream extends
BlockExtendedInputStream {
private final Function<BlockID, BlockLocationInfo> refreshFunction;
+ @SuppressWarnings("checkstyle:ParameterNumber")
public BlockInputStream(BlockID blockId, long blockLen, Pipeline pipeline,
Token<OzoneBlockTokenIdentifier> token, boolean verifyChecksum,
XceiverClientFactory xceiverClientFactory,
- Function<BlockID, BlockLocationInfo> refreshFunction) {
+ Function<BlockID, BlockLocationInfo> refreshFunction,
+ OzoneClientConfig config) {
Review Comment:
We can get rid of `verifyChecksum`, since `RpcClient` takes the value for
that argument from `OzoneClientConfig`. This way parameter count remains the
same and we can avoid suppressing the warning. I know this requires updating
the complete call chain again, sorry about that.
https://github.com/apache/ozone/blob/dcffbb2ff88037391bef3c52f598c80213f29b9a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L2263-L2266
https://github.com/apache/ozone/blob/dcffbb2ff88037391bef3c52f598c80213f29b9a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L2280-L2283
https://github.com/apache/ozone/blob/dcffbb2ff88037391bef3c52f598c80213f29b9a/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L2292-L2295
--
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]