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

Add method to retrieve the namespace names for the Dynamo Admin #679

Merged

Conversation

Torch3333
Copy link
Contributor

@Torch3333 Torch3333 commented Aug 30, 2022

This implement the admin.getNamespaceNames() for the DynamoAdmin.

@Torch3333 Torch3333 added the enhancement New feature or request label Aug 30, 2022
@Torch3333 Torch3333 self-assigned this Aug 30, 2022
Base automatically changed from add_get_namespace_names_to_jdbc_admin to master September 1, 2022 00:46
@Torch3333 Torch3333 force-pushed the add_get_namespace_names_to_dynamo_admin branch 4 times, most recently from 231c721 to 02bd289 Compare September 2, 2022 05:05
@Torch3333 Torch3333 force-pushed the add_get_namespace_names_to_dynamo_admin branch from 02bd289 to 0153c23 Compare September 2, 2022 06:04
@Torch3333 Torch3333 marked this pull request as ready for review September 2, 2022 07:13
feeblefakie
feeblefakie previously approved these changes Sep 3, 2022
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!
Left one minor suggestion on the naming.
(if it is appropriate, please fix it, but you don't need to request for re-review)

}
}

private void dropAllTableOfNamespace(Namespace namespace) throws ExecutionException {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private void dropAllTableOfNamespace(Namespace namespace) throws ExecutionException {
private void dropAllTablesOfNamespace(Namespace namespace) throws ExecutionException {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I applied it.

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM overall. Left several comments. Please take a look when you have time!

} catch (ConditionalCheckFailedException e) {
throw new ExecutionException(
"the namespace " + namespace + " cannot be created as it already exists");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should also handle other runtime exceptions here?

Suggested change
}
} catch (Exception e) {
...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you. I revised it, please have a look again.

Comment on lines +787 to +791
throw new ExecutionException(
"dropping the namespace "
+ Namespace.of(namespacePrefix, nonPrefixedNamespace)
+ " failed",
e);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like this can throw a ExecutionException whose cause is also ExecutionException?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I do this to give more context to the ExecutionException thrown by a sub-method. I think the stack trace produced makes it easier to understand the root reason for the error.

@Torch3333 Torch3333 requested a review from brfrn169 September 7, 2022 01:58
Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@Torch3333 Torch3333 changed the base branch from master to feat/namespaces_management September 7, 2022 08:05
@Torch3333
Copy link
Contributor Author

I changed the PR target branch to the feat/namespaces_management branch that will contain all the namespaces management-related changes.

@brfrn169 Sorry for the trouble. Please have a look again.

@feeblefakie It seems your review is not required since I did not push anything since your last review but feel free to have a look again.

@Torch3333 Torch3333 added backward-incompatible and removed enhancement New feature or request labels Sep 7, 2022
Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@brfrn169 brfrn169 merged commit ba3a94d into feat/namespaces_management Sep 8, 2022
@brfrn169 brfrn169 deleted the add_get_namespace_names_to_dynamo_admin branch September 8, 2022 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants