You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sreejasahithi (via GitHub)" <gi...@apache.org> on 2025/12/10 12:34:39 UTC
Re: [PR] HDDS-14036. StreamRead: Make preReadSize, responseDataSize and read timeout configurable [ozone]
sreejasahithi commented on code in PR #9461:
URL: https://github.com/apache/ozone/pull/9461#discussion_r2606494914
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestStreamBlockInputStream.java:
##########
@@ -280,4 +289,39 @@ private void testReadEmptyBlock() throws Exception {
assertEquals(-1, keyInputStream.read());
}
}
+
+ @Test
+ public void testCustomStreamReadConfigIsApplied() throws Exception {
+ // Arrange: create a config with non-default values
+ OzoneConfiguration conf = new OzoneConfiguration();
+ conf.set("ozone.client.stream.read.pre-read-size", "67108864");
+ conf.set("ozone.client.stream.read.response-data-size", "2097152");
+ conf.set("ozone.client.stream.read.timeout", "5s");
+
+ OzoneClientConfig clientConfig = conf.getObject(OzoneClientConfig.class);
+
+ // Sanity check
+ assertEquals(Duration.ofSeconds(5), clientConfig.getStreamReadTimeout());
+
+ BlockID blockID = new BlockID(1L, 1L);
+ long length = 1024L;
+
+ // 💡 Pipeline 用 mock 就可以,不需要真的建一個
Review Comment:
Could we please add the comment in english.
--
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