Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with C* <= 2.1.9 not having the StorageServiceMBean.getEndp… #123

Merged
merged 1 commit into from
Jun 21, 2017

Conversation

adejanovski
Copy link
Contributor

…ointToHostId() method

The fix to correctly compute the number of parallel repairs fails with versions of Cassandra before 2.1.10 because the StorageServiceMBean.getEndpointToHostId() didn't exist yet.

Fallbacking to the deprecated getHostIdMap() in case the former doesn't exist.

@tlpsonarqube
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • MINOR 1 minor

Watch the comments in this conversation to review them.

try{
hosts = ((StorageServiceMBean) ssProxy).getEndpointToHostId();
} catch(UndeclaredThrowableException e){
hosts = ((StorageServiceMBean) ssProxy).getHostIdMap();
Copy link
Collaborator

Choose a reason for hiding this comment

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

MINOR Remove this use of "getHostIdMap"; it is deprecated. rule

Copy link
Member

@michaelsembwever michaelsembwever left a comment

Choose a reason for hiding this comment

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

LGTM!

@adejanovski adejanovski merged commit cacd6dc into master Jun 21, 2017
@adejanovski adejanovski deleted the fix-endpointtohostid-issue branch June 21, 2017 13:40
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