Skip to content

Conversation

@wycccccc
Copy link
Contributor

What changes were proposed in this pull request?

Add old config key rpcslowness.timeout to handle deprecated configs

What is the link to the Apache JIRA

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

How was this patch tested?

Added unit test.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @wycccccc for working on this. Unfortunately the patch is not enough to handle deprecated configs.

  1. rpc.slowness.timeout is only part of the config key name. It is defined in and should be used together with its prefix, which comes from
    @ConfigGroup(prefix = HDDS_DATANODE_RATIS_PREFIX_KEY + "."
    + RaftServerConfigKeys.PREFIX)
  2. The ConfigurationProvider changed in this patch is for Recon, but the config key belongs to Datanode, another component of Ozone. The DeprecationDelta should be added somewhere in org.apache.hadoop.hdds.conf in hadoop-hdds. (Sidenote: I think DatanodeRatis*Config classes belong to hadoop-hdds/container-service, not hadoop-hdds/framework.)

@wycccccc
Copy link
Contributor Author

Thank @adoroszlai for your suggestion, I will try to modify it correctly.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @wycccccc for updating the patch. The change looks good to achieve the desired goal. I think cohesion might be improved by adding the deprecation in RaftServerConfigKeys instead of OzoneConfiguration, but it may have downsides, too, so I'm OK with the current version.

Can you please fix checkstyle violations?

@wycccccc
Copy link
Contributor Author

wycccccc commented Dec 1, 2020

I have fixed checkstyle violations.Thanks @adoroszlai for your suggestion, it helped me a lot.

@adoroszlai adoroszlai changed the title HDDS-4491. Handle deprecated configs HDDS-4491. Deprecate raft.server.rpcslowness.timeout config key Dec 11, 2020
@adoroszlai adoroszlai merged commit d02659c into apache:master Dec 11, 2020
@adoroszlai
Copy link
Contributor

Thanks @wycccccc for the contribution.

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.

2 participants