You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "chiacyu (via GitHub)" <gi...@apache.org> on 2025/03/06 16:47:53 UTC
[PR] HDDS-12477. Do not force RATIS/ONE replication in TestDataUtil#createKey [ozone]
chiacyu opened a new pull request, #8017:
URL: https://github.com/apache/ozone/pull/8017
## What changes were proposed in this pull request?
Improve `TestDataUtil#createKey` to avoid the need to pass `ReplicationConfig` unnecessarily:
- Allow `TestDataUtil#createKey(OzoneBucket, String, ReplicationConfig, byte[])` to be called with `repConfig=null`, in which case it should create the key using `OzoneBucket#createKey(String, long)`
- Change `createKey(OzoneBucket, String, byte[])` to pass null instead of `RATIS/ONE`
- Tests that call `createKey(OzoneBucket, String, byte[])` and start failing should be changed to pass `RATIS/ONE` explicitly.
- Change callers of `TestDataUtil#createKey(OzoneBucket, String, ReplicationConfig, byte[])` to not pass `ReplicationConfig`, unless necessary for the test.
## What is the link to the Apache JIRA
[HDDS-12477](https://issues.apache.org/jira/browse/HDDS-12477)
## How was this patch tested?
It can test by CI.
--
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-12477. Do not force RATIS/ONE replication in TestDataUtil#createKey [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #8017:
URL: https://github.com/apache/ozone/pull/8017#discussion_r1983731202
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestCloseContainer.java:
##########
@@ -109,8 +106,7 @@ public void testReplicasAreReportedForClosedContainerAfterRestart()
throws Exception {
// Create some keys to write data into the open containers
for (int i = 0; i < 10; i++) {
- TestDataUtil.createKey(bucket, "key" + i, ReplicationConfig
- .fromTypeAndFactor(ReplicationType.RATIS, ReplicationFactor.THREE),
+ TestDataUtil.createKey(bucket, "key" + i, null,
Review Comment:
No need to pass `null` as `ReplicationConfig`, since we have `createKey(OzoneBucket, String, byte[])`.
```suggestion
TestDataUtil.createKey(bucket, "key" + i,
```
(Applies to all invocations where third parameter is `null`.)
--
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-12477. Do not force RATIS/ONE replication in TestDataUtil#createKey [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #8017:
URL: https://github.com/apache/ozone/pull/8017
--
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