jojochuang commented on code in PR #7456:
URL: https://github.com/apache/ozone/pull/7456#discussion_r1915972096
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java:
##########
@@ -77,7 +81,10 @@ public class BlockInputStream extends
BlockExtendedInputStream {
new AtomicReference<>();
private final boolean verifyChecksum;
private XceiverClientFactory xceiverClientFactory;
- private XceiverClientSpi xceiverClient;
+ private XceiverClientSpi xceiverClientGrpc;
+ private XceiverClientShortCircuit xceiverClientShortCircuit;
+ private final AtomicBoolean fallbackToGrpc = new AtomicBoolean(false);
+ private FileInputStream blockInputStream;
Review Comment:
IMO the variable name blockInputStream is confusing because it's not a
BlockInputStream after all.
What about something like 'chunkFileInputStream'
##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java:
##########
@@ -354,8 +444,13 @@ protected synchronized void addStream(ChunkInfo chunkInfo)
{
}
protected ChunkInputStream createChunkInputStream(ChunkInfo chunkInfo) {
- return new ChunkInputStream(chunkInfo, blockID,
- xceiverClientFactory, pipelineRef::get, verifyChecksum, tokenRef::get);
+ if (blockInputStream != null) {
Review Comment:
blockInputStream != null implies the file is opened by SCR.
--
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]