jerryshao commented on code in PR #5369:
URL: https://github.com/apache/gravitino/pull/5369#discussion_r1824562149
##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/dispatcher/IcebergTableEventDispatcher.java:
##########
@@ -74,17 +75,18 @@ public IcebergTableEventDispatcher(
@Override
public LoadTableResponse createTable(
- String catalogName, Namespace namespace, CreateTableRequest
createTableRequest) {
+ IcebergRequestContext context, Namespace namespace, CreateTableRequest
createTableRequest) {
TableIdentifier tableIdentifier = TableIdentifier.of(namespace,
createTableRequest.name());
NameIdentifier nameIdentifier =
- IcebergRestUtils.getGravitinoNameIdentifier(metalakeName, catalogName,
tableIdentifier);
+ IcebergRestUtils.getGravitinoNameIdentifier(
+ metalakeName, context.getCatalogName(), tableIdentifier);
eventBus.dispatchEvent(
new IcebergCreateTablePreEvent(
PrincipalUtils.getCurrentUserName(), nameIdentifier,
createTableRequest));
Review Comment:
My feeling is that exposing the request header to the event seems not so
good, makes the event listener too flexible to do anything. If we want to do
check request header check beforehand, maybe we can implement some filters in
Jetty, and let Gravitino have the ability to load the custom filters.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]