milvus-logo
LFAI
< Docs
  • Java

transferNode()

MilvusClient interface. This method transfers a query node from the source resource group to another resource group.

R<RpcStatus> transferNode(TransferNodeParam requestParam);

TransferNodeParam

Use the TransferNodeParam.Builder to construct a TransferNodeParam object.

import io.milvus.param. TransferNodeParam;
TransferNodeParam.Builder builder =  TransferNodeParam.newBuilder();

Methods of TransferNodeParam.Builder:

Method

Description

Parameters

withSourceGroupName(String groupName)

Sets the source group name. groupName cannot be empty or null.

groupName: The name of the source group.

withTargetGroupName(String groupName)

Sets the target group name. groupName cannot be empty or null.

groupName: The name of the target group.

withNodeNumber(Integer nodeNumber)

Specify how many query nodes to transfer to another resource group.

nodeNumber: The number of nodes to transfer.

build()

Construct a TransferNodeParam object.

N/A

The TransferNodeParam.Builder.build() can throw the following exceptions:

  • ParamException: error if the parameter is invalid.

Returns

This method catches all the exceptions and returns an R<RpcStatus> object.

  • If the API fails on the server side, it returns the error code and message from the server.

  • If the API fails by RPC exception, it returns R.Status.Unknown and error message of the exception.

  • If the API succeeds, it returns R.Status.Success.

Example

import io.milvus.param.TransferNodeParam;

R<RpcStatus> response = client.transferNode(TransferNodeParam.newBuilder()
            .withSourceGroupName(sourceName)
            .withTargetGroupName(targetName)
            .withNodeNumber(1)
            .build());

if (response.getStatus() != R.Status.Success.getCode()) {
    throw new RuntimeException(response.getMessage());
}
Feedback

Was this page helpful?