-
Notifications
You must be signed in to change notification settings - Fork 390
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
[#5900] feat(tag): support tag pre-event to Gravitino server #5980
base: main
Are you sure you want to change the base?
Conversation
@amazingLychee could you rebase your code since #5944 is merged |
cc @cool9850311 |
@FANNG1 Thanks for letting me know. I will rebase my code later. |
Event represents an specific operation to specific resource, the current implement pass metalake as resource name, this's not correct for some event, please refer to XXTagFailureEvent for the definition of the resource. |
d5551da
to
cbc6a05
Compare
@FANNG1 I commit the implement of the tag pre-event and I am working on the test right now. Thank you! |
could you add test in |
* @param changes The changes being applied to the tag. | ||
*/ | ||
public AlterTagPreEvent(String user, String metalake, String tagName, TagChange[] changes) { | ||
super(user, NameIdentifier.of(metalake, tagName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use NameIdentifierUtil.ofTag(metalake, name)
public class DeleteTagPreEvent extends TagPreEvent { | ||
|
||
public DeleteTagPreEvent(String user, String metalake, String tagName) { | ||
super(user, NameIdentifier.of(metalake, tagName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NameIdentifierUtil.ofTag(metalake, name)
@DeveloperApi | ||
public class GetTagPreEvent extends TagPreEvent { | ||
public GetTagPreEvent(String user, String metalake, String tagName) { | ||
super(user, NameIdentifierUtil.ofTag(metalake, tagName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NameIdentifierUtil.ofTag(metalake, name)
* @param tagName The name of the tag. | ||
*/ | ||
public ListMetadataObjectsForTagPreEvent(String user, String metalake, String tagName) { | ||
super(user, NameIdentifierUtil.ofTag(metalake, tagName)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NameIdentifierUtil.ofTag(metalake, name)
@@ -98,6 +98,5 @@ public enum OperationType { | |||
VIEW_EXISTS, | |||
RENAME_VIEW, | |||
LIST_VIEW, | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about keeping this empty line?
import org.apache.gravitino.utils.NameIdentifierUtil; | ||
|
||
@DeveloperApi | ||
public class GetTagPreEvent extends TagPreEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc
import org.apache.gravitino.annotation.DeveloperApi; | ||
|
||
@DeveloperApi | ||
public class ListTagsInfoPreEvent extends TagPreEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc
import org.apache.gravitino.annotation.DeveloperApi; | ||
|
||
@DeveloperApi | ||
public class ListTagsPreEvent extends TagPreEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc
import org.apache.gravitino.annotation.DeveloperApi; | ||
|
||
@DeveloperApi | ||
public class CreateTagPreEvent extends TagPreEvent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc
What changes were proposed in this pull request?
Implemented pre-event handling for all tag-related operations, including:
Why are the changes needed?
(Please clarify why the changes are needed. For instance,
Fix: #5900
Does this PR introduce any user-facing change?
No
How was this patch tested?
(Please test your changes, and provide instructions on how to test it: