Skip to content

HDDS-5168. Use ReplicationConfig in OmKeyArgs#2287

Merged
umamaheswararao merged 24 commits intoapache:masterfrom
elek:om-key-args
Jun 4, 2021
Merged

HDDS-5168. Use ReplicationConfig in OmKeyArgs#2287
umamaheswararao merged 24 commits intoapache:masterfrom
elek:om-key-args

Conversation

@elek
Copy link
Member

@elek elek commented May 27, 2021

What changes were proposed in this pull request?

During the implementation of HDDS-5145 I realized that OmKeyArgs also uses factor/type, it seems to be easier to convert it to replicationConfig as it's an in-memory class not a protobuf which is required to be persisted.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-5168

How was this patch tested?

Full CI test.

@elek elek requested review from arp7, sodonnel and umamaheswararao May 27, 2021 05:58
return replicationFactor;
return ReplicationFactor
.fromProto(ReplicationConfig.getLegacyFactor(replicationConfig));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a getReplicationConfig() here, as we are deprecating the getType and Factor methods?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I added the getter. It's not yet used, but can be useful for users of the Java API.

Copy link
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes LGTM. I had just one comment on a missing getter. It would be good to add it, but its not essential right now.

@umamaheswararao
Copy link
Contributor

Changes looks good to me. I see. I think currently deprecated APIs used in the place where we may want to use getReplicationConfig API. I think thats ok for now? they are existing calls already( to deprecated APIs) and eventually new usage required to add that API(getReplicationConfig) and use it. If we wanted to add now, thats ok too. Thanks

@elek
Copy link
Member Author

elek commented Jun 2, 2021

Thanks the review @sodonnel and @umamaheswararao

I think currently deprecated APIs used in the place where we may want to use getReplicationConfig API.

@umamaheswararao Can you please add some examples: I see examples where S3StorageType is used (which should be extended anyway), but not sure what other usages are in your mind...

@umamaheswararao umamaheswararao merged commit 405925f into apache:master Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants