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

[remove datanode] Add Remove DataNode SQL #14678

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

HxpSerein
Copy link
Collaborator

Description

same as the title

Copy link
Contributor

@OneSizeFitsQuorum OneSizeFitsQuorum left a comment

Choose a reason for hiding this comment

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

  1. add it
  2. add table model support

Copy link
Collaborator

@liyuheng55555 liyuheng55555 left a comment

Choose a reason for hiding this comment

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

Good work! This SQL will make it much easier to remove DataNode. I have made some suggestions.

In addition, after implementing this SQL, can we simplify the current remove-datanode.sh ?

Comment on lines +468 to +470
removeDataNodeStatement
: REMOVE DATANODE dataNodeId=INTEGER_VALUE (',' dataNodeId=INTEGER_VALUE)*
;
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove datanodes ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same

Comment on lines 224 to 226
DATANODEADDRESS
: D A T A N O D E A D D R E S S
;
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

@@ -536,6 +536,11 @@ verifyConnection
: VERIFY CONNECTION (DETAILS)?
;

// ---- Remove DataNode
removeDataNode
: REMOVE DATANODE dataNodeId=INTEGER_LITERAL (COMMA dataNodeId=INTEGER_LITERAL)*
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove datanodes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Both "datanode" and "datanodes" make sense in this context, so I’d prefer to leave it as is for now.

Comment on lines 2813 to 2814
LOGGER.info(
"Start to remove datanode, removed DataNodes endpoint: {}", removeDataNodeLocations);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not recommended to print TDataNodeLocation directly, because it's too long.

Please consider RegionMaintainHandler.simplifiedLocation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed

@HxpSerein
Copy link
Collaborator Author

In addition, after implementing this SQL, can we simplify the current remove-datanode.sh ?

Good point! With the addition of the remove datanode SQL, I feel the remove-datanode.sh script might no longer be necessary and could potentially be removed. What do you think? @OneSizeFitsQuorum @liyuheng55555

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