= ({
render: (replicationInfo: ReplicationInfo) => (
{
- (replicationInfo.replicationType === "RATIS")
- ? replicationInfo.replicationFactor
- : `${replicationInfo.codec}-${replicationInfo.data}-${replicationInfo.parity}`
+ (replicationInfo.replicationType === "EC")
+ ? `${replicationInfo.codec}-${replicationInfo.data}-${replicationInfo.parity}`
+ : replicationInfo.replicationFactor
}
)
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/buckets/buckets.tsx b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/buckets/buckets.tsx
index ae3376df480d..4b8abb31eee1 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/buckets/buckets.tsx
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/pages/buckets/buckets.tsx
@@ -177,7 +177,8 @@ const Buckets: React.FC<{}> = () => {
quotaInBytes: bucket.quotaInBytes,
quotaInNamespace: bucket.quotaInNamespace,
owner: bucket.owner,
- acls: bucket.acls
+ acls: bucket.acls,
+ replicationConfigInfo: bucket.replicationConfigInfo
}));
const volumeBucketMap: Map> = getVolumeBucketMap(buckets);
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/bucket.types.ts b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/bucket.types.ts
index eb499dc617e7..98d033d1b1c2 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/bucket.types.ts
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/bucket.types.ts
@@ -17,6 +17,7 @@
*/
import { Acl } from "@/v2/types/acl.types";
+import { ReplicationInfo } from '@/v2/types/insights.types';
import { Option as MultiOption } from "@/v2/components/select/multiSelect";
// Corresponds to OzoneManagerProtocolProtos.StorageTypeProto
@@ -37,6 +38,14 @@ export const BucketLayoutTypeList = [
export type BucketLayout = typeof BucketLayoutTypeList[number];
+// Corresponds to the serialized org.apache.hadoop.hdds.client.DefaultReplicationConfig
+// returned by the Recon bucket endpoint (BucketObjectDBInfo#replicationConfigInfo).
+// The nested config is the same shape the OM DB insights endpoints return.
+export type BucketReplicationConfig = {
+ type: string;
+ replicationConfig?: ReplicationInfo | null;
+}
+
export type Bucket = {
volumeName: string;
name: string;
@@ -53,6 +62,7 @@ export type Bucket = {
owner: string;
acls?: Acl[];
bucketLayout: BucketLayout;
+ replicationConfigInfo?: BucketReplicationConfig | null;
}
export type BucketResponse = {
diff --git a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/insights.types.ts b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/insights.types.ts
index 55f2bc7a0324..7b2333b40270 100644
--- a/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/insights.types.ts
+++ b/hadoop-ozone/recon/src/main/resources/webapps/recon/ozone-recon-web/src/v2/types/insights.types.ts
@@ -119,7 +119,16 @@ export interface EcInfo {
minimumNodes: number;
}
-export type ReplicationInfo = RatisInfo | EcInfo;
+// StandaloneReplicationConfig serializes its replicationType as STANDALONE,
+// without the underscore used by the ReplicationType enum name STAND_ALONE
+export interface StandaloneInfo {
+ replicationType: 'STANDALONE' | 'STAND_ALONE';
+ replicationFactor: string;
+ requiredNodes: number;
+ minimumNodes: number;
+}
+
+export type ReplicationInfo = RatisInfo | EcInfo | StandaloneInfo;
// Open Keys
export type OpenKeys = {