swamirishi commented on code in PR #8589:
URL: https://github.com/apache/ozone/pull/8589#discussion_r2221898988
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/metadata/WitnessedContainerMetadataStoreImpl.java:
##########
@@ -67,13 +74,53 @@ private
WitnessedContainerMetadataStoreImpl(ConfigurationSource config, boolean
@Override
protected DBStore initDBStore(DBStoreBuilder dbStoreBuilder,
ManagedDBOptions options, ConfigurationSource config)
throws RocksDatabaseException, CodecException {
+ previousVersionTables = new PreviousVersionTables();
+ previousVersionTables.addTables(dbStoreBuilder);
final DBStore dbStore = dbStoreBuilder.build();
- this.containerIdsTable =
this.getDbDef().getContainerIdsTable().getTable(dbStore);
+ previousVersionTables.init(dbStore);
+ this.containerCreateInfoTable =
this.getDbDef().getContainerCreateInfoTableDef().getTable(dbStore);
return dbStore;
}
@Override
- public Table<ContainerID, String> getContainerIdsTable() {
- return containerIdsTable;
+ public Table<ContainerID, ContainerCreateInfo> getContainerCreateInfoTable()
{
+ if
(!VersionedDatanodeFeatures.isFinalized(HDDSLayoutFeature.WITNESSED_CONTAINER_DB_PROTO_VALUE))
{
Review Comment:
A few instances...
https://github.com/apache/ozone/blob/5d1b43d44fa435b5a304bd1d99e8fa4a60d092cf/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ListIterator.java#L300-L302
https://github.com/apache/ozone/blob/48c985f8f65c9c0d99c2b3fadc74683f05c1efc7/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/service/QuotaRepairTask.java#L336-L339
https://github.com/apache/ozone/blob/48c985f8f65c9c0d99c2b3fadc74683f05c1efc7/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineStateManagerImpl.java#L60-L65
Our entire code base is spread with such use cases.
--
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]