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

[#5550] feat(core): add partition pre event to Gravitino event #5590

Merged

Conversation

LiuQhahah
Copy link
Contributor

@LiuQhahah LiuQhahah commented Nov 15, 2024

What changes were proposed in this pull request?

  1. add corresponding PartitionPreEvent
  2. generate pre-event in PartitionEventDispatcher
  3. add test in TestPartitionEvent
  4. add document in gravitino-server-config.md

Why are the changes needed?

Fix: #5550

Does this PR introduce any user-facing change?

NO

How was this patch tested?

UT

@LiuQhahah LiuQhahah changed the title #5550-add-partition-pre-event-for-Gravitino-server [#5550] feat(core): add partition pre event to Gravitino event Nov 15, 2024
@xunliu xunliu requested a review from FANNG1 November 19, 2024 03:51
FANNG1
FANNG1 previously approved these changes Nov 21, 2024
@jerryshao
Copy link
Contributor

Please update the PR to fix the conflict, @LiuQhahah .

…itino-server

# Conflicts:
#	docs/gravitino-server-config.md
@FANNG1
Copy link
Contributor

FANNG1 commented Nov 21, 2024

@LiuQhahah as #5580 is merged first, could you rebase the code and add more work:

  1. add operationType method to all specific partition event.
 @Override
  public OperationType operationType() {
    // change the type according to the event type
    return OperationType.LIST_PARTITION;
  }
  1. add partition type test in TestPartitionEvent for partition pre event like TestTableEvent

@LiuQhahah
Copy link
Contributor Author

@LiuQhahah as #5580 is merged first, could you rebase the code and add more work:

  1. add operationType method to all specific partition event.
 @Override
  public OperationType operationType() {
    // change the type according to the event type
    return OperationType.LIST_PARTITION;
  }
  1. add partition type test in TestPartitionEvent for partition pre event like TestTableEvent

got it.
I will do it tonight.
Thanks,
Qiang

partitionInfo = ((AddPartitionPreEvent) preEvent).createdPartitionRequest();
checkPartitionInfo(partitionInfo, partition);
Assertions.assertEquals(OperationType.ADD_PARTITION, event.operationType());
Assertions.assertEquals(OperationStatus.SUCCESS, event.operationStatus());
Copy link
Contributor

Choose a reason for hiding this comment

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

The operation status should be UNPROCESSED not SUCCESS for pre event

Copy link
Contributor

Choose a reason for hiding this comment

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

we should check preEvent not event here

@FANNG1
Copy link
Contributor

FANNG1 commented Nov 23, 2024

@LiuQhahah ,LGTM except minor comments, could you fix it ?

@LiuQhahah
Copy link
Contributor Author

@LiuQhahah ,LGTM except minor comments, could you fix it ?

Hi @FANNG1

I have fixed the issue.

Please review it again.
Thanks,
Qiang

FANNG1
FANNG1 previously approved these changes Nov 25, 2024
@jerryshao
Copy link
Contributor

There're some UT failures that need to be fixed.

@LiuQhahah
Copy link
Contributor Author

HI @jerryshao @FANNG1

I have updated it.
please help to review it again.
sorry.
Thanks,
Qiang

@FANNG1 FANNG1 merged commit c1b9885 into apache:main Nov 25, 2024
26 checks passed
@FANNG1
Copy link
Contributor

FANNG1 commented Nov 25, 2024

@LiuQhahah merged to main, thanks for your contribution!

@LiuQhahah LiuQhahah deleted the #5550-add-partition-pre-event-for-Gravitino-server branch November 25, 2024 09:49
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.

[Subtask] add partition pre event for Gravitino server
4 participants