You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ChenSammi (via GitHub)" <gi...@apache.org> on 2025/04/22 06:17:58 UTC

[PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

ChenSammi opened a new pull request, #8316:
URL: https://github.com/apache/ozone/pull/8316

   ## What changes were proposed in this pull request?
   
   allow "ozone freon rk" command to choose validate channel, whether grpc or short-circuit. 
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-11651
   
   ## How was this patch tested?
   Test it manually with docker cluster 
   
   ```
   bash-5.1$ ozone freon rk  --numOfVolumes 1 --numOfBuckets 1 --keySize 1MB --factor=THREE --replication-type=RATIS --numOfKeys 1000 --validate-writes --validate-channel=grpc
   2025-04-22 06:09:52,275 [main] INFO impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties
   2025-04-22 06:09:52,401 [main] INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
   2025-04-22 06:09:52,401 [main] INFO impl.MetricsSystemImpl: ozone-freon metrics system started
   2025-04-22 06:09:53,389 [main] INFO freon.RandomKeyGenerator: Number of Threads: 10
   2025-04-22 06:09:53,410 [main] INFO freon.RandomKeyGenerator: Number of Volumes: 1.
   2025-04-22 06:09:53,410 [main] INFO freon.RandomKeyGenerator: Number of Buckets per Volume: 1.
   2025-04-22 06:09:53,410 [main] INFO freon.RandomKeyGenerator: Number of Keys per Bucket: 1000.
   2025-04-22 06:09:53,411 [main] INFO freon.RandomKeyGenerator: Key size: 1048576 bytes
   2025-04-22 06:09:53,411 [main] INFO freon.RandomKeyGenerator: Buffer size: 4096 bytes
   2025-04-22 06:09:53,411 [main] INFO freon.RandomKeyGenerator: validateWrites : true
   2025-04-22 06:09:53,411 [main] INFO freon.RandomKeyGenerator: Number of Validate Threads: 1
   2025-04-22 06:09:53,411 [main] INFO freon.RandomKeyGenerator: cleanObjects : false
   2025-04-22 06:09:53,418 [main] INFO freon.RandomKeyGenerator: Data validation is enabled.
   2025-04-22 06:09:53,419 [main] INFO freon.RandomKeyGenerator: Starting progress bar Thread.
   2025-04-22 06:09:53,425 [pool-2-thread-2] INFO rpc.RpcClient: Creating Volume: vol-0-02243, with hadoop as owner and space quota set to -1 bytes, counts quota set to -1
   
    0.00% |?                                                                                                    |  0/1000 Time: 0:00:00|  2025-04-22 06:09:53,498 [pool-2-thread-1] INFO rpc.RpcClient: Creating Bucket: vol-0-02243/bucket-0-38990, with server-side default bucket layout, hadoop as owner, Versioning false, Storage Type set to DISK and Encryption set to false, Replication Type set to server-side default replication type, Namespace Quota set to -1, Space Quota set to -1 
   2025-04-22 06:09:53,719 [pool-2-thread-8] WARN impl.MetricsSystemImpl: ozone-freon metrics system already initialized!
   2025-04-22 06:09:53,982 [pool-2-thread-4] INFO metrics.MetricRegistries: Loaded MetricRegistries class org.apache.ratis.metrics.dropwizard3.Dm3MetricRegistriesImpl
    0.00% |?                                                                                                    |  0/1000 Time: 0:00:01|  2025-04-22 06:09:55,140 [pool-4-thread-1] INFO scm.XceiverClientGrpc: XceiverClientGrpc is created for pipeline Pipeline{ Id: 3c93544b-311f-464c-91fb-5017a85bbeeb, Nodes: [ {7ed3178b-28f9-40fd-bfe5-78bf7ddbf184(ozone_datanode3_1.ozone_default/172.18.0.2), ReplicaIndex: 0}, {059ecda4-50f3-4c3d-8f09-260ffd944066(ozone_datanode2_1.ozone_default/172.18.0.3), ReplicaIndex: 0}, {4502d31b-a194-429e-9172-8690f8c5c463(ozone_datanode1_1.ozone_default/172.18.0.9), ReplicaIndex: 0},], ReplicationConfig: STANDALONE/THREE, State: OPEN, leaderId: 4502d31b-a194-429e-9172-8690f8c5c463, CreationTimestamp: 2025-04-22T06:09:30.037Z[UTC]}
    100.00% |?????????????????????????????????????????????????????????????????????????????????????????????????????|  1000/1000 Time: 0:00:18|  
   2025-04-22 06:10:11,529 [main] INFO freon.RandomKeyGenerator: Data generation is completed
   2025-04-22 06:12:12,223 [main] INFO freon.RandomKeyGenerator: Data validation is completed
   
   ***************************************************
   Status: Success
   Git Base Revision: 4d7825309348956336b8f06a08322b78422849b1
   Number of Volumes created: 1
   Number of Buckets created: 1
   Number of Keys added: 1000
   Replication: RATIS/THREE
   Average Time spent in volume creation: 00:00:00,006
   Average Time spent in bucket creation: 00:00:00,001
   Average Time spent in key creation: 00:00:01,723
   Average Time spent in key write: 00:00:14,353
   Total bytes written: 1048576000
   Total number of writes validated: 1000
   Writes validated: 100.0 %
   Successful validation: 1000
   Unsuccessful validation: 0
   Average Time spent in key read and validation: 00:02:13,908
   Total Execution time: 00:02:19,869
   ***************************************************
   ```
   
   ```
   ash-5.1$ ozone freon rk  --numOfVolumes 1 --numOfBuckets 1 --keySize 1MB --factor=THREE --replication-type=RATIS --numOfKeys 1000 --validate-writes --validate-channel=short-circuit
   2025-04-22 06:14:00,705 [main] INFO impl.MetricsConfig: Loaded properties from hadoop-metrics2.properties
   2025-04-22 06:14:00,883 [main] INFO impl.MetricsSystemImpl: Scheduled Metric snapshot period at 10 second(s).
   2025-04-22 06:14:00,884 [main] INFO impl.MetricsSystemImpl: ozone-freon metrics system started
   2025-04-22 06:14:01,864 [main] INFO storage.DomainSocketFactory: Trying to load the custom-built native-hadoop library...
   2025-04-22 06:14:01,864 [main] INFO storage.DomainSocketFactory: Loaded the native-hadoop library
   2025-04-22 06:14:01,866 [main] INFO storage.DomainSocketFactory: short-circuit reads is enabled within 1027417 ns.
   2025-04-22 06:14:01,932 [main] INFO freon.RandomKeyGenerator: Number of Threads: 10
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Number of Volumes: 1.
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Number of Buckets per Volume: 1.
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Number of Keys per Bucket: 1000.
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Key size: 1048576 bytes
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Buffer size: 4096 bytes
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: validateWrites : true
   2025-04-22 06:14:01,961 [main] INFO freon.RandomKeyGenerator: Number of Validate Threads: 1
   2025-04-22 06:14:01,962 [main] INFO freon.RandomKeyGenerator: cleanObjects : false
   2025-04-22 06:14:01,971 [main] INFO freon.RandomKeyGenerator: Data validation is enabled.
   2025-04-22 06:14:01,974 [main] INFO freon.RandomKeyGenerator: Starting progress bar Thread.
   
    0.00% |?                                                                                                    |  0/1000 Time: 0:00:00|  2025-04-22 06:14:01,982 [pool-2-thread-1] INFO rpc.RpcClient: Creating Volume: vol-0-41024, with hadoop as owner and space quota set to -1 bytes, counts quota set to -1
   2025-04-22 06:14:02,072 [pool-2-thread-2] INFO rpc.RpcClient: Creating Bucket: vol-0-41024/bucket-0-25901, with server-side default bucket layout, hadoop as owner, Versioning false, Storage Type set to DISK and Encryption set to false, Replication Type set to server-side default replication type, Namespace Quota set to -1, Space Quota set to -1 
   2025-04-22 06:14:02,259 [pool-2-thread-5] WARN impl.MetricsSystemImpl: ozone-freon metrics system already initialized!
   2025-04-22 06:14:02,534 [pool-2-thread-3] INFO metrics.MetricRegistries: Loaded MetricRegistries class org.apache.ratis.metrics.dropwizard3.Dm3MetricRegistriesImpl
    0.00% |?                                                                                                    |  0/1000 Time: 0:00:01|  2025-04-22 06:14:03,460 [pool-4-thread-1] INFO scm.XceiverClientShortCircuit: XceiverClientShortCircuit is created for pipeline Pipeline{ Id: 3c93544b-311f-464c-91fb-5017a85bbeeb, Nodes: [ {7ed3178b-28f9-40fd-bfe5-78bf7ddbf184(ozone_datanode3_1.ozone_default/172.18.0.2), ReplicaIndex: 0}, {059ecda4-50f3-4c3d-8f09-260ffd944066(ozone_datanode2_1.ozone_default/172.18.0.3), ReplicaIndex: 0}, {4502d31b-a194-429e-9172-8690f8c5c463(ozone_datanode1_1.ozone_default/172.18.0.9), ReplicaIndex: 0},], ReplicationConfig: STANDALONE/THREE, State: OPEN, leaderId: 4502d31b-a194-429e-9172-8690f8c5c463, CreationTimestamp: 2025-04-22T06:09:30.037Z[UTC]}
   2025-04-22 06:14:03,485 [pool-4-thread-1] INFO storage.DomainSocketFactory: DomainSocket(fd=290,path=/opt/hadoop/ozone_dn3_socket) is created within 25245375 ns
   2025-04-22 06:14:03,496 [pool-4-thread-1] INFO scm.XceiverClientShortCircuit: XceiverClientShortCircuit-DomainSocket(fd=290,path=/opt/hadoop/ozone_dn3_socket) is started
    100.00% |?????????????????????????????????????????????????????????????????????????????????????????????????????|  1000/1000 Time: 0:00:17|  
   2025-04-22 06:14:19,071 [main] INFO freon.RandomKeyGenerator: Data generation is completed
   2025-04-22 06:14:22,286 [main] INFO freon.RandomKeyGenerator: Data validation is completed
   2025-04-22 06:14:22,292 [XceiverClientShortCircuit-DomainSocket(fd=290,path=/opt/hadoop/ozone_dn3_socket)-ReceiveResponse] INFO scm.XceiverClientShortCircuit: DomainSocket(fd=290,path=/opt/hadoop/ozone_dn3_socket) receiveResponseTask is closed after send 1000 requests and received 1000 responses, due to java.io.EOFException
   java.io.EOFException
           at java.base/java.io.DataInputStream.readFully(DataInputStream.java:210)
           at java.base/java.io.DataInputStream.readShort(DataInputStream.java:319)
           at org.apache.hadoop.hdds.scm.XceiverClientShortCircuit$ReceiveResponseTask.run(XceiverClientShortCircuit.java:460)
           at java.base/java.lang.Thread.run(Thread.java:1583)
   2025-04-22 06:14:22,301 [main] INFO scm.XceiverClientShortCircuit: DomainSocket(fd=290,path=/opt/hadoop/ozone_dn3_socket) is closed for 7ed3178b-28f9-40fd-bfe5-78bf7ddbf184(ozone_datanode3_1.ozone_default/172.18.0.2) with 1000 requests sent and 1000 responses received
   
   ***************************************************
   Status: Success
   Git Base Revision: 4d7825309348956336b8f06a08322b78422849b1
   Number of Volumes created: 1
   Number of Buckets created: 1
   Number of Keys added: 1000
   Replication: RATIS/THREE
   Average Time spent in volume creation: 00:00:00,008
   Average Time spent in bucket creation: 00:00:00,001
   Average Time spent in key creation: 00:00:01,521
   Average Time spent in key write: 00:00:13,876
   Total bytes written: 1048576000
   Total number of writes validated: 1000
   Writes validated: 100.0 %
   Successful validation: 1000
   Unsuccessful validation: 0
   Average Time spent in key read and validation: 00:00:12,532
   Total Execution time: 00:00:21,301
   ***************************************************
   ```
   
   
   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074700906


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   > For the enum suggestion, I would prefer to keep using the String.
   
   Can you please explain the reason?



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853233517

   > sometime starts the docker cluster locally
   
   That's fine, the containers run the same way locally and in CI.  There will be no conflict between datanodes.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074711966


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   Creating local `enum` in the CLI class (`RandomKeyGenerator` here) is a small change and it allows picocli to validate the input for us.
   
   https://picocli.info/#_enum_types



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2069363786


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   - I think `--validation-channel` would be a better name, since we are not validating the channel.
   - Make it an `enum` with possible values for the option.



##########
hadoop-ozone/dist/src/main/compose/ozone-short-circuit-read/docker-config-datanode1:
##########
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+OZONE-SITE.XML_ozone.client.read.short-circuit=true
+OZONE-SITE.XML_ozone.domain.socket.path=/opt/ozone_dn1_socket

Review Comment:
   Why do we need to create a completely new environment to add some config?  Can we use the add-on approach (create `test-short-circuit-read.sh` in existing env, with few extra configs)?



##########
hadoop-ozone/dist/src/main/compose/ozone-short-circuit-read/test.sh:
##########
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#suite:short-circuit-read

Review Comment:
   Do we need a separate split for this?  It can be added to `misc` instead.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853203703

   > > Please see [adoroszlai@ed80294](https://github.com/adoroszlai/ozone/commit/ed80294e3b8354c81bebb4df715f1b97f65b93d3) for suggested simplification of the compose setup.
   > configure the domain.socket.path with the same value doesn't work. It will fail as different datanodes cannot reuse the same path locally.
   
   Each datanode runs in its own Docker container, so even if the path is the same, they do not share it.
   
   Please take a look at the CI run from my commit:
   
   ```
   Executing test ozone/test-short-circuit-read.sh
   ...
   Run rk with key validation through short-circuit channel              | PASS |
   ```


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074702417


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   There is no existing enum which includes both grpc and short-circuit, and I also has no intend to create a new enum for that too because it's will be used anywhere else. 
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853245482

   > > sometime starts the docker cluster locally
   > 
   > That's fine, the containers run the same way locally and in CI. There will be no conflict between datanodes.
   
   There are conflicts on local. Each datanode will create its domain socket file, which maps to the same local host path. That's why need to set different domain path for different datanodes. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074711966


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   https://picocli.info/#_enum_types



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #8316:
URL: https://github.com/apache/ozone/pull/8316


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853319112

   > There are conflicts on local. Each datanode will create its domain socket file, which maps to the same local host path. That's why need to set different domain path for different datanodes.
   
   `/opt/hadoop` is mounted from the local host (that's how Ozone binaries are used with `ozone-runner`), so anything in that directory is shared between the containers.  `/opt/ozone_dn_socket` is not shared.
   
   Please try building https://github.com/adoroszlai/ozone/commit/ed80294e3b8354c81bebb4df715f1b97f65b93d3 and run tests locally:
   
   ```bash
   cd hadoop-ozone/dist/target/ozone-2.1.0-SNAPSHOT/compose/ozone
   KEEP_RUNNING=true ./test-short-circuit-read.sh
   ```
   
   With `KEEP_RUNNING=true`, the cluster is kept alive after the test is done, and can be investigated / further tested manually.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074697451


##########
hadoop-ozone/dist/src/main/compose/ozone-short-circuit-read/docker-config-datanode1:
##########
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+OZONE-SITE.XML_ozone.client.read.short-circuit=true
+OZONE-SITE.XML_ozone.domain.socket.path=/opt/ozone_dn1_socket

Review Comment:
   I think running complete `basic` Robot test suite is unnecessary.  I only kept `freon/read-write-key.robot` and it is passing.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853214309

   > It's shared when you run the test locally on laptop
   
   You don't need to run Robot tests on your laptop.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074702417


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   There is no existing enum which includes both grpc and short-circuit, and I also has no intend to create a new enum for that too because it's will not be used anywhere else. 
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074671960


##########
hadoop-ozone/dist/src/main/compose/ozone-short-circuit-read/docker-config-datanode1:
##########
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+OZONE-SITE.XML_ozone.client.read.short-circuit=true
+OZONE-SITE.XML_ozone.domain.socket.path=/opt/ozone_dn1_socket

Review Comment:
   The first commit is an add-on approach, which turned out a lot of other existing tests were failed, for these existing tests some assume datanode hostname is datanode, not datanode_x, some others are EC test, which assume 5 or more datanodes.  The add-on approach requires rewriting multiple tests called under compose/tests. And these tests are also called under other compose directories.  



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2875344620

   Thanks @adoroszlai @jojochuang  for the review. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074698100


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   Option name changed. For the enum suggestion, I would prefer to keep using the String. Thanks. 



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853194982

   > Thanks @ChenSammi for the patch.
   > 
   > Please see [adoroszlai@ed80294](https://github.com/adoroszlai/ozone/commit/ed80294e3b8354c81bebb4df715f1b97f65b93d3) for suggested simplification of the compose setup.
   
   @adoroszlai , thanks for the suggestion.  But configure the domain.socket.path with the same value doesn't work. It will fail as different datanodes cannot reuse the same path locally. 
   
   OZONE-SITE.XML_ozone.domain.socket.path: /opt/ozone_dn_socket 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074702417


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   There is no existing enum which includes both grpc and short-circuit, and I also has no intend to create a new enum for that. 



##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   There is no existing enum which includes both grpc and short-circuit, and I also has no intend to create a new enum for that too.
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074711966


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   Creating local `enum` in the CLI class (`RandomKeyGenerator` here) allows picocli to validate the input for us.
   
   https://picocli.info/#_enum_types



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853210333

   > commit
   
   
   
   > > > Please see [adoroszlai@ed80294](https://github.com/adoroszlai/ozone/commit/ed80294e3b8354c81bebb4df715f1b97f65b93d3) for suggested simplification of the compose setup.
   > > > configure the domain.socket.path with the same value doesn't work. It will fail as different datanodes cannot reuse the same path locally.
   > 
   > Each datanode runs in its own Docker container, so even if the path is the same, they do not share it.
   > 
   > Please take a look at the CI run from my commit:
   > 
   > ```
   > Executing test ozone/test-short-circuit-read.sh
   > ...
   > Run rk with key validation through short-circuit channel              | PASS |
   > ```
   
   It's shared when you run the test locally on laptop. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on code in PR #8316:
URL: https://github.com/apache/ozone/pull/8316#discussion_r2074702417


##########
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/freon/RandomKeyGenerator.java:
##########
@@ -168,6 +169,11 @@ enum FreonOps {
       defaultValue = "1")
   private int numOfValidateThreads = 1;
 
+  @Option(names = {"--validate-channel"},
+      description = "grpc or short-circuit.",
+      defaultValue = "grpc")
+  private String validateChannel = "grpc";

Review Comment:
   There is no existing enum which includes both grpc and short-circuit, and I also has no intend to create a new enum for that now because it's will not be used anywhere else. 
   



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2853217790

   > > It's shared when you run the test locally on laptop
   > 
   > You don't need to run Robot tests on your laptop.
   
   Not just robot test, sometime starts the docker cluster locally to run some other tests which is not suitable for run as robot test. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-11651. Support short-circuit read channel for freon rk command [ozone]

Posted by "ChenSammi (via GitHub)" <gi...@apache.org>.
ChenSammi commented on PR #8316:
URL: https://github.com/apache/ozone/pull/8316#issuecomment-2826820241

   > Is the acceptance test failiure related?
   
   Yes. I configured the DomainSocket path to /opt/hadoop.  It requires the owner of /opt/hadoop is hadoop, and which is expected.  But somehow, in the failed acceptance test, the owner of /opt/hadoop is user "ow". Then short-cicuit load process fails due to the path permission check failure.  I'm just checking where the owner of /opt/hadoop is changed. No luck no far. 


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org