RefreshExternalCollectionJobInfo
Information of an external-collection refresh job, as returned by ListRefreshExternalCollectionJobs() and GetRefreshExternalCollectionProgress().
public sealed class RefreshExternalCollectionJobInfo
{
public long JobId { get; }
public string CollectionName { get; }
public RefreshExternalCollectionState State { get; }
public long Progress { get; }
public string Reason { get; }
public string ExternalSource { get; }
public long StartTime { get; }
public long EndTime { get; }
public string ExternalSpec { get; }
}
PARAMETERS:
JobId(long) -The job identifier.
CollectionName(string) -The name of the collection being refreshed.
State(RefreshExternalCollectionState) -The current state of the refresh job.
Progress(long) -The refresh progress in percent (0 to 100).
Reason(string) -The failure reason of the job, empty when the job has not failed.
ExternalSource(string) -The external source used for this job.
StartTime(long) -The start timestamp of the job (Unix epoch in milliseconds), 0 if not started.
EndTime(long) -The end timestamp of the job (Unix epoch in milliseconds), 0 if not completed.
ExternalSpec(string) -The external spec used for this job.
RefreshExternalCollectionState
This enum represents the state of an external-collection refresh job.
public enum RefreshExternalCollectionState
{
Pending = 0,
InProgress = 1,
Completed = 2,
Failed = 3
}
Constants:
Pending (0)
The refresh job has been created but has not started running.
InProgress (1)
The refresh job is currently executing.
Completed (2)
The refresh job has completed successfully.
Failed (3)
The refresh job has failed.
Example
using Milvus.Client.V2;
using Milvus.Client.V2.Requests.Utility;
using Milvus.Client.V2.Responses.Utility;
using Milvus.Client.V2.Types;
using var client = new MilvusClientV2(new ConnectConfig
{
Uri = "localhost:19530",
Username = "root",
Password = "Milvus"
});
GetRefreshExternalCollectionProgressResp result = await client.GetRefreshExternalCollectionProgressAsync(new GetRefreshExternalCollectionProgressReq
{
JobId = 12345
});
RefreshExternalCollectionJobInfo job = result.JobInfo;
Console.WriteLine($"{job.CollectionName}: {job.State} ({job.Progress}%)");