stantheman0128 commented on code in PR #10968:
URL: https://github.com/apache/ozone/pull/10968#discussion_r3775463749
##########
hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/bucket.types.ts:
##########
@@ -37,6 +37,37 @@ export const BucketLayoutTypeList = [
export type BucketLayout = typeof BucketLayoutTypeList[number];
+// Corresponds to the serialized
org.apache.hadoop.hdds.client.RatisReplicationConfig
+// and StandaloneReplicationConfig. The latter serializes its replicationType
as
+// STANDALONE, while the enum name used elsewhere is STAND_ALONE, so both
spellings
+// can reach the UI.
+type BucketRatisReplicationConfig = {
Review Comment:
Done. I added a `StandaloneInfo` variant to `insights.types.ts`, widened
`ReplicationInfo` to include it, and the bucket types now reuse it instead of
redeclaring the shape. That also picks up `minimumNodes` as you noted.
One knock-on effect worth flagging. `openKeysTable` already consumes
`ReplicationInfo`, and its Replication Factor column narrows on `RATIS` and
treats everything else as EC:
```ts
(replicationInfo.replicationType === "RATIS")
? replicationInfo.replicationFactor
:
`${replicationInfo.codec}-${replicationInfo.data}-${replicationInfo.parity}`
```
With a third variant in the union that stops type checking, because `codec`
does not exist on the Standalone shape. I changed the check to test for `EC`
explicitly so the EC branch only sees `EcInfo`. Under the old form, an open key
reporting Standalone would have rendered `undefined-undefined-undefined`. I
have not verified whether that state is reachable for open keys, so I kept the
change to the narrowing and did not add a test for it. Happy to split that into
its own Jira if you would rather keep this PR to the bucket page.
One more thing that came out of this: `StandaloneReplicationConfig`
serializes `replicationType` as `STANDALONE` without the underscore, while the
enum name is `STAND_ALONE`. The Javadoc on that method says so directly. Both
spellings are mapped so the column renders `Standalone-1` either way.
--
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]