Skip to content

PHOENIX-7933 Avoid using reflection to initialize ServerCacheFactory#2539

Open
virajjasani wants to merge 1 commit into
apache:masterfrom
virajjasani:PHOENIX-7933-master
Open

PHOENIX-7933 Avoid using reflection to initialize ServerCacheFactory#2539
virajjasani wants to merge 1 commit into
apache:masterfrom
virajjasani:PHOENIX-7933-master

Conversation

@virajjasani

Copy link
Copy Markdown
Contributor

Jira: PHOENIX-7933

What changes were proposed in this pull request?

ServerCacheFactory does not need reflection based initialization as we have only two implementations. For foreseeable future, we do not expect to add more implementations.

Why are the changes needed?

Using reflection is overhead as we don't expect more implementations of ServerCacheFactory.

Does this PR introduce any user-facing change?

No

How was this patch tested?

UTs, ITs

Was this patch authored or co-authored using generative AI tooling?

No

@virajjasani

Copy link
Copy Markdown
Contributor Author

} else if (IndexMetaDataCacheFactory.class.getName().equals(factoryClassName)) {
cacheFactory = new IndexMetaDataCacheFactory();
} else {
throw new DoNotRetryIOException("Disallowed ServerCacheFactory class: " + factoryClassName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: is it possible to add a test for this branch?

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