szetszwo commented on code in PR #10694:
URL: https://github.com/apache/ozone/pull/10694#discussion_r3589594530
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -535,6 +535,17 @@ public class DatanodeConfiguration extends
ReconfigurableConfig {
private boolean waitOnAllFollowers = WAIT_ON_ALL_FOLLOWERS_DEFAULT;
+ public static final String HDDS_DATANODE_DATASTREAM_PUTBLOCK_ENABLED =
+ CONFIG_PREFIX + ".datastream.putblock.enabled";
Review Comment:
It seems to make it a client side conf. We may add a new
ContainerProtos.Type, say StreamInitWithPutBlock and set it in the following
line:
-
https://github.com/apache/ozone/blob/398709d6b68312306149144795c5796d4d3fa8b3/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockDataStreamOutput.java#L216
Then, server could support both V2 and V3 at the same time.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/impl/KeyValueStreamDataChannel.java:
##########
@@ -41,12 +46,25 @@ public class KeyValueStreamDataChannel extends
StreamDataChannelBase {
private final Buffers buffers = new
Buffers(BlockDataStreamOutput.PUT_BLOCK_REQUEST_LENGTH_MAX);
+ private final AtomicReference<ContainerCommandRequestProto> putBlockRequest
+ = new AtomicReference<>();
private final AtomicBoolean closed = new AtomicBoolean();
+ private boolean datastreamPutBlockEnabled;
+ private StreamPutBlockProcessor putBlockProcessor;
Review Comment:
- Once we have StreamInitWithPutBlock, we can initialize putBlockProcessor
at the constructor.
- datastreamPutBlockEnabled is not needed. Just check if putBlockProcessor
!= null.
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -160,6 +160,7 @@ public class ContainerStateMachine extends BaseStateMachine
{
private final Semaphore applyTransactionSemaphore;
private final boolean waitOnBothFollowers;
+ private final boolean datastreamPutBlockEnabled;
Review Comment:
This is a also not needed since the KeyValueStreamDataChannel is created
with either StreamInitWithPutBlock or StreamInit.
--
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]