Documentation ¶
Index ¶
- Variables
- func NewChunkMgrFactory() *chunkMgrFactory
- func NewMockChunkManager() *mockChunkmgr
- func NewMockIndexNodeComponent(ctx context.Context) (types.IndexNodeComponent, error)
- func ParseStorageConfig(s *indexpb.StorageConfig) (*indexcgopb.StorageConfig, error)
- type Blob
- type IndexNode
- func (i *IndexNode) CloseSegcore()
- func (i *IndexNode) CreateJob(ctx context.Context, req *workerpb.CreateJobRequest) (*commonpb.Status, error)
- func (i *IndexNode) CreateJobV2(ctx context.Context, req *workerpb.CreateJobV2Request) (*commonpb.Status, error)
- func (i *IndexNode) DropJobs(ctx context.Context, req *workerpb.DropJobsRequest) (*commonpb.Status, error)
- func (i *IndexNode) DropJobsV2(ctx context.Context, req *workerpb.DropJobsV2Request) (*commonpb.Status, error)
- func (i *IndexNode) GetAddress() string
- func (i *IndexNode) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
- func (i *IndexNode) GetJobStats(ctx context.Context, req *workerpb.GetJobStatsRequest) (*workerpb.GetJobStatsResponse, error)
- func (i *IndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
- func (i *IndexNode) GetNodeID() int64
- func (i *IndexNode) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
- func (i *IndexNode) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
- func (i *IndexNode) Init() error
- func (i *IndexNode) QueryJobs(ctx context.Context, req *workerpb.QueryJobsRequest) (*workerpb.QueryJobsResponse, error)
- func (i *IndexNode) QueryJobsV2(ctx context.Context, req *workerpb.QueryJobsV2Request) (*workerpb.QueryJobsV2Response, error)
- func (i *IndexNode) Register() error
- func (i *IndexNode) SetAddress(address string)
- func (i *IndexNode) SetEtcdClient(client *clientv3.Client)
- func (i *IndexNode) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)
- func (i *IndexNode) Start() error
- func (i *IndexNode) Stop() error
- func (i *IndexNode) UpdateStateCode(code commonpb.StateCode)
- type IndexTaskQueue
- type StorageFactory
- type TaskQueue
- type TaskScheduler
- type TaskState
- type UniqueID
Constants ¶
This section is empty.
Variables ¶
var Params *paramtable.ComponentParam = paramtable.Get()
Params is a GlobalParamTable singleton of indexnode
var TaskStateNames = map[TaskState]string{
0: "Normal",
1: "Abandon",
2: "Retry",
3: "Failed",
}
Functions ¶
func NewChunkMgrFactory ¶
func NewChunkMgrFactory() *chunkMgrFactory
func NewMockChunkManager ¶
func NewMockChunkManager() *mockChunkmgr
func NewMockIndexNodeComponent ¶
func NewMockIndexNodeComponent(ctx context.Context) (types.IndexNodeComponent, error)
func ParseStorageConfig ¶
func ParseStorageConfig(s *indexpb.StorageConfig) (*indexcgopb.StorageConfig, error)
Types ¶
type IndexNode ¶
type IndexNode struct {
// contains filtered or unexported fields
}
IndexNode is a component that executes the task of building indexes.
func NewIndexNode ¶
func NewIndexNode(ctx context.Context, factory dependency.Factory) *IndexNode
NewIndexNode creates a new IndexNode component.
func (*IndexNode) CloseSegcore ¶
func (i *IndexNode) CloseSegcore()
func (*IndexNode) CreateJobV2 ¶
func (*IndexNode) DropJobsV2 ¶
func (*IndexNode) GetAddress ¶
func (*IndexNode) GetComponentStates ¶
func (i *IndexNode) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
GetComponentStates gets the component states of IndexNode.
func (*IndexNode) GetJobStats ¶
func (i *IndexNode) GetJobStats(ctx context.Context, req *workerpb.GetJobStatsRequest) (*workerpb.GetJobStatsResponse, error)
GetJobStats should be GetSlots
func (*IndexNode) GetMetrics ¶
func (i *IndexNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
GetMetrics gets the metrics info of IndexNode. TODO(dragondriver): cache the Metrics and set a retention to the cache
func (*IndexNode) GetStatisticsChannel ¶
func (i *IndexNode) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
GetStatisticsChannel gets the statistics channel of IndexNode.
func (*IndexNode) GetTimeTickChannel ¶
func (i *IndexNode) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
GetTimeTickChannel gets the time tick channel of IndexNode.
func (*IndexNode) QueryJobs ¶
func (i *IndexNode) QueryJobs(ctx context.Context, req *workerpb.QueryJobsRequest) (*workerpb.QueryJobsResponse, error)
func (*IndexNode) QueryJobsV2 ¶
func (i *IndexNode) QueryJobsV2(ctx context.Context, req *workerpb.QueryJobsV2Request) (*workerpb.QueryJobsV2Response, error)
func (*IndexNode) SetAddress ¶
func (*IndexNode) SetEtcdClient ¶
SetEtcdClient assigns parameter client to its member etcdCli
func (*IndexNode) ShowConfigurations ¶
func (i *IndexNode) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)
ShowConfigurations returns the configurations of indexNode matching req.Pattern
func (*IndexNode) UpdateStateCode ¶
UpdateStateCode updates the component state of IndexNode.
type IndexTaskQueue ¶
type IndexTaskQueue struct {
// contains filtered or unexported fields
}
BaseTaskQueue is a basic instance of TaskQueue.
func NewIndexBuildTaskQueue ¶
func NewIndexBuildTaskQueue(sched *TaskScheduler) *IndexTaskQueue
NewIndexBuildTaskQueue creates a new IndexBuildTaskQueue.
func (*IndexTaskQueue) AddActiveTask ¶
func (queue *IndexTaskQueue) AddActiveTask(t task)
AddActiveTask adds a task to activeTasks.
func (*IndexTaskQueue) Enqueue ¶
func (queue *IndexTaskQueue) Enqueue(t task) error
Enqueue adds a task to TaskQueue.
func (*IndexTaskQueue) GetTaskNum ¶
func (queue *IndexTaskQueue) GetTaskNum() (int, int)
func (*IndexTaskQueue) PopActiveTask ¶
func (queue *IndexTaskQueue) PopActiveTask(tName string) task
PopActiveTask pops a task from activateTask and the task will be executed.
func (*IndexTaskQueue) PopUnissuedTask ¶
func (queue *IndexTaskQueue) PopUnissuedTask() task
PopUnissuedTask pops a task from tasks queue.
type StorageFactory ¶
type StorageFactory interface {
NewChunkManager(ctx context.Context, config *indexpb.StorageConfig) (storage.ChunkManager, error)
}
type TaskQueue ¶
type TaskQueue interface { PopUnissuedTask() task AddActiveTask(t task) PopActiveTask(tName string) task Enqueue(t task) error GetTaskNum() (int, int) // contains filtered or unexported methods }
TaskQueue is a queue used to store tasks.
type TaskScheduler ¶
type TaskScheduler struct { TaskQueue TaskQueue // contains filtered or unexported fields }
TaskScheduler is a scheduler of indexing tasks.
func NewTaskScheduler ¶
func NewTaskScheduler(ctx context.Context) *TaskScheduler
NewTaskScheduler creates a new task scheduler of indexing tasks.
func (*TaskScheduler) Close ¶
func (sched *TaskScheduler) Close()
Close closes the task scheduler of indexing tasks.
func (*TaskScheduler) Start ¶
func (sched *TaskScheduler) Start() error
Start stats the task scheduler of indexing tasks.