< Docs
  • Java


A MilvusClient interface. This method gets the state of loading collection progress.

R<GetLoadStateResponse> getLoadState(GetLoadStateParam requestParam);


Use the GetLoadStateParam.Builder to construct a GetLoadStateParam object.

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

Methods of GetLoadStateParam.Builder:

Method Description Parameters
withCollectionName(String collectionName) Sets the collection name. Collection name cannot be empty or null. collectionName: The name of the collection to get state.
withPartitionNames(List\ partitionNames) Sets partition names list to specify query scope (Optional). partitionNames:
A name list of partition to get state.
addPartitionName(String partitionName) Adds a partition by name. Partition name cannot be empty or null. partitionName: A partition name.
build() Constructs a GetLoadStateParam object. N/A

The can throw the following exceptions:

  • ParamException: error if the parameter is invalid.


This method catches all the exceptions and returns an R<GetLoadStateResponse> 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 the error message of the exception.

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


import io.milvus.param.*;

GetLoadStateParam param = GetLoadStateParam.newBuilder()
R<GetLoadStateResponse> response = client.getLoadState(param);
if (response.getStatus() != R.Status.Success.getCode()) {