This is an automated email from the ASF dual-hosted git repository.
chihsuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 63fdd289fc2 HDDS-17456. Remove the test-only BlockInputStream
constructor (#11755)
63fdd289fc2 is described below
commit 63fdd289fc298aadd88786075535dbeb519e2c6a
Author: Andy Huang <[email protected]>
AuthorDate: Tue Oct 27 19:51:44 2026 +0800
HDDS-17456. Remove the test-only BlockInputStream constructor (#11755)
---
.../org/apache/hadoop/hdds/scm/storage/BlockInputStream.java | 10 ----------
.../test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java | 5 +++--
2 files changed, 3 insertions(+), 12 deletions(-)
diff --git
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
index 90accc18137..ca980de1494 100644
---
a/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
+++
b/hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockInputStream.java
@@ -129,16 +129,6 @@ public BlockInputStream(
this.retryPolicy = getReadRetryPolicy(config);
}
- // only for unit tests
- public BlockInputStream(BlockID blockId, long blockLen, Pipeline pipeline,
- Token<OzoneBlockTokenIdentifier> token,
- XceiverClientFactory xceiverClientFactory,
- OzoneClientConfig config
- ) throws IOException {
- this(new BlockLocationInfo(new
BlockLocationInfo.Builder().setBlockID(blockId).setLength(blockLen)),
- pipeline, token, xceiverClientFactory, null, config);
- }
-
/**
* Initialize the BlockInputStream. Get the BlockData (list of chunks) from
* the Container and create the ChunkInputStreams for each Chunk in the
Block.
diff --git
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
index 6c72ab378cf..c69e218eda2 100644
---
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
+++
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestChunkStreams.java
@@ -29,6 +29,7 @@
import org.apache.hadoop.hdds.conf.OzoneConfiguration;
import org.apache.hadoop.hdds.scm.OzoneClientConfig;
import org.apache.hadoop.hdds.scm.storage.BlockInputStream;
+import org.apache.hadoop.hdds.scm.storage.BlockLocationInfo;
import org.apache.hadoop.ozone.client.io.KeyInputStream;
import org.junit.jupiter.api.Test;
@@ -97,8 +98,8 @@ private List<BlockInputStream> createInputStreams(String
dataString) throws IOEx
private BlockInputStream createStream(byte[] buf, int offset) throws
IOException {
OzoneClientConfig clientConfig = conf.getObject(OzoneClientConfig.class);
clientConfig.setChecksumVerify(true);
- return new BlockInputStream(null, 100L, null, null, null,
- clientConfig) {
+ return new BlockInputStream(new
BlockLocationInfo.Builder().setLength(100L).build(),
+ null, null, null, null, clientConfig) {
private long pos;
private final ByteArrayInputStream in =
new ByteArrayInputStream(buf, offset, 100);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]