-
Notifications
You must be signed in to change notification settings - Fork 166
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
enhance: add resource group declarative api #755
enhance: add resource group declarative api #755
Conversation
Some code should not be merged into sdk. |
e0ef263
to
e8f98a6
Compare
e8f98a6
to
2227ad0
Compare
2227ad0
to
d927743
Compare
- Add UpdateResourceGroups and modify AddResourceGroup api. Signed-off-by: chyezh <[email protected]>
d927743
to
e836ded
Compare
Signed-off-by: chyezh <[email protected]>
e333af1
to
0016e15
Compare
ResourceGroupInfo.Builder builder = ResourceGroupInfo.newBuilder() | ||
.withResourceGroupName(resourceGroupName) | ||
.withRequestsNodeNum(resourceGroupInfo.getResourceGroup().getConfig().getRequests().getNodeNum()) | ||
.withConfig(new ResourceGroupConfig(resourceGroupInfo.getResourceGroup().getConfig())); |
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.
it's weird to pass rg config and requestNodeNum at same time
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.
redundant code here, I will remove it.
.withCollectionName(collection) | ||
.withSourceGroupName(currentResourceGroupName) | ||
.withTargetGroupName(resourceGroupName) | ||
.withReplicaNumber(1L) |
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.
why just we transfer only one replica to target resource group?
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.
It's an example. For easy coding, add a single replica limits here.
I will add a comment to explain it.
if (replicas.getReplicasCount() > 1) { | ||
// Multi replica is now supported now. | ||
throw new RuntimeException(String.format("Replica number {} is greater than 1, did not support now", | ||
replicas.getReplicasCount())); |
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.
multi replica is supported now
return null; | ||
} | ||
|
||
return replicas.getReplicasList().get(0).getResourceGroupName(); |
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.
ditto
Signed-off-by: chyezh <[email protected]>
/lgtm |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chyezh, yelusion2 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…)" This reverts commit 491fe0d. Declarative Resource Group API should not released in 2.4.0. Signed-off-by: chyezh <[email protected]>
This reverts commit 491fe0d. Declarative Resource Group API should not released in 2.4.0. Signed-off-by: chyezh <[email protected]>
* enhance: add updates resource group for java sdk - Add UpdateResourceGroups and modify AddResourceGroup api. Signed-off-by: chyezh <[email protected]> * fix: resource group example Signed-off-by: chyezh <[email protected]> * fix: remove redundant code Signed-off-by: chyezh <[email protected]> --------- Signed-off-by: chyezh <[email protected]>
* enhance: add resource group declarative api (#755) * enhance: add updates resource group for java sdk - Add UpdateResourceGroups and modify AddResourceGroup api. Signed-off-by: chyezh <[email protected]> * fix: resource group example Signed-off-by: chyezh <[email protected]> * fix: remove redundant code Signed-off-by: chyezh <[email protected]> --------- Signed-off-by: chyezh <[email protected]> * fix: resource group: dependency lost in example, and support java8 Signed-off-by: chyezh <[email protected]> --------- Signed-off-by: chyezh <[email protected]>
issue: milvus-io/milvus#32282
Add
UpdateResourceGroups
and modifyAddResourceGroup
api.Add example for add resource group declarative api.