RefreshExternalCollectionJobInfo
This class holds the information of an external collection refresh job, as returned by ListRefreshExternalCollectionJobs() and GetRefreshExternalCollectionProgress(). Each field has a corresponding Set*() setter.
METHODS:
int64_t JobID() constThe refresh job identifier.
const std::string& CollectionName() constThe name of the collection being refreshed.
RefreshExternalCollectionStateCode State() constThe current state of the refresh job. See RefreshExternalCollectionStateCode.
int32_t Progress() constThe refresh progress in percent (0 to 100).
const std::string& Reason() constThe failure reason of the refresh job, empty when the job has not failed.
const std::string& ExternalSource() constThe external data source, e.g. an S3 path.
uint64_t StartTime() constThe start timestamp of the refresh job.
uint64_t EndTime() constThe end timestamp of the refresh job.
const nlohmann::json& ExternalSpec() constThe external specification of the collection.
Example
#include "milvus/MilvusClientV2.h"
#include <iostream>
using namespace milvus;
// ListRefreshExternalCollectionJobs() returns one job-info object per job
auto client = MilvusClientV2::Create();
client->Connect(ConnectParam("http://localhost:19530").WithToken("root:Milvus"));
ListRefreshExternalCollectionJobsResponse response;
auto status = client->ListRefreshExternalCollectionJobs(
ListRefreshExternalCollectionJobsRequest().WithCollectionName("my_collection"),
response);
if (!status.IsOk()) {
std::cout << status.Message() << std::endl;
}
for (const auto& job : response.Jobs()) {
std::cout << "job " << job.JobID()
<< " state=" << static_cast<int>(job.State())
<< " progress=" << job.Progress() << std::endl;
}