Documentation ¶
Index ¶
- Constants
- type LocalWorker
- func (w *LocalWorker) Delete(ctx context.Context, req *querypb.DeleteRequest) error
- func (w *LocalWorker) DeleteBatch(ctx context.Context, req *querypb.DeleteBatchRequest) (*querypb.DeleteBatchResponse, error)
- func (w *LocalWorker) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)
- func (w *LocalWorker) IsHealthy() bool
- func (w *LocalWorker) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error
- func (w *LocalWorker) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
- func (w *LocalWorker) QueryStreamSegments(ctx context.Context, req *querypb.QueryRequest, ...) error
- func (w *LocalWorker) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) error
- func (w *LocalWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
- func (w *LocalWorker) Stop()
- type QueryNode
- func (node *QueryNode) CloseSegcore()
- func (node *QueryNode) Delete(ctx context.Context, req *querypb.DeleteRequest) (*commonpb.Status, error)
- func (node *QueryNode) DeleteBatch(ctx context.Context, req *querypb.DeleteBatchRequest) (*querypb.DeleteBatchResponse, error)
- func (node *QueryNode) GetAddress() string
- func (node *QueryNode) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
- func (node *QueryNode) GetDataDistribution(ctx context.Context, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
- func (node *QueryNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
- func (node *QueryNode) GetNodeID() int64
- func (node *QueryNode) GetSegmentInfo(ctx context.Context, in *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)
- func (node *QueryNode) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)
- func (node *QueryNode) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
- func (node *QueryNode) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
- func (node *QueryNode) Init() error
- func (node *QueryNode) InitSegcore() error
- func (node *QueryNode) LoadPartitions(ctx context.Context, req *querypb.LoadPartitionsRequest) (*commonpb.Status, error)
- func (node *QueryNode) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
- func (node *QueryNode) Query(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
- func (node *QueryNode) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
- func (node *QueryNode) QueryStream(req *querypb.QueryRequest, srv querypb.QueryNode_QueryStreamServer) error
- func (node *QueryNode) QueryStreamSegments(req *querypb.QueryRequest, srv querypb.QueryNode_QueryStreamSegmentsServer) error
- func (node *QueryNode) Register() error
- func (node *QueryNode) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)
- func (node *QueryNode) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
- func (node *QueryNode) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
- func (node *QueryNode) Search(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
- func (node *QueryNode) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
- func (node *QueryNode) SetAddress(address string)
- func (node *QueryNode) SetEtcdClient(client *clientv3.Client)
- func (node *QueryNode) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)
- func (node *QueryNode) Start() error
- func (node *QueryNode) Stop() error
- func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDistributionRequest) (*commonpb.Status, error)
- func (node *QueryNode) SyncReplicaSegments(ctx context.Context, req *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)
- func (node *QueryNode) UnsubDmChannel(ctx context.Context, req *querypb.UnsubDmChannelRequest) (*commonpb.Status, error)
- func (node *QueryNode) UpdateStateCode(code commonpb.StateCode)
- func (node *QueryNode) WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (status *commonpb.Status, e error)
Constants ¶
const ( // index type IndexFaissIDMap = "FLAT" IndexFaissIVFFlat = "IVF_FLAT" IndexFaissIVFPQ = "IVF_PQ" IndexScaNN = "SCANN" IndexFaissIVFSQ8 = "IVF_SQ8" IndexFaissBinIDMap = "BIN_FLAT" IndexFaissBinIVFFlat = "BIN_IVF_FLAT" IndexHNSW = "HNSW" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalWorker ¶
type LocalWorker struct {
// contains filtered or unexported fields
}
func NewLocalWorker ¶
func NewLocalWorker(node *QueryNode) *LocalWorker
func (*LocalWorker) Delete ¶
func (w *LocalWorker) Delete(ctx context.Context, req *querypb.DeleteRequest) error
func (*LocalWorker) DeleteBatch ¶
func (w *LocalWorker) DeleteBatch(ctx context.Context, req *querypb.DeleteBatchRequest) (*querypb.DeleteBatchResponse, error)
func (*LocalWorker) GetStatistics ¶
func (w *LocalWorker) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)
func (*LocalWorker) IsHealthy ¶
func (w *LocalWorker) IsHealthy() bool
func (*LocalWorker) LoadSegments ¶
func (w *LocalWorker) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) error
func (*LocalWorker) QuerySegments ¶
func (w *LocalWorker) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
func (*LocalWorker) QueryStreamSegments ¶
func (w *LocalWorker) QueryStreamSegments(ctx context.Context, req *querypb.QueryRequest, srv streamrpc.QueryStreamServer) error
func (*LocalWorker) ReleaseSegments ¶
func (w *LocalWorker) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) error
func (*LocalWorker) SearchSegments ¶
func (w *LocalWorker) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
func (*LocalWorker) Stop ¶
func (w *LocalWorker) Stop()
type QueryNode ¶
type QueryNode struct {
// contains filtered or unexported fields
}
QueryNode communicates with outside services and union all services in querynode package.
QueryNode implements `types.Component`, `types.QueryNode` interfaces.
`rootCoord` is a grpc client of root coordinator. `indexCoord` is a grpc client of index coordinator. `stateCode` is current statement of this query node, indicating whether it's healthy.
func NewQueryNode ¶
func NewQueryNode(ctx context.Context, factory dependency.Factory) *QueryNode
NewQueryNode will return a QueryNode with abnormal state.
func (*QueryNode) CloseSegcore ¶
func (node *QueryNode) CloseSegcore()
func (*QueryNode) Delete ¶
func (node *QueryNode) Delete(ctx context.Context, req *querypb.DeleteRequest) (*commonpb.Status, error)
Delete is used to forward delete message between delegator and workers.
func (*QueryNode) DeleteBatch ¶
func (node *QueryNode) DeleteBatch(ctx context.Context, req *querypb.DeleteBatchRequest) (*querypb.DeleteBatchResponse, error)
DeleteBatch is the API to apply same delete data into multiple segments. it's basically same as `Delete` but cost less memory pressure.
func (*QueryNode) GetAddress ¶
func (*QueryNode) GetComponentStates ¶
func (node *QueryNode) GetComponentStates(ctx context.Context, req *milvuspb.GetComponentStatesRequest) (*milvuspb.ComponentStates, error)
GetComponentStates returns information about whether the node is healthy
func (*QueryNode) GetDataDistribution ¶
func (node *QueryNode) GetDataDistribution(ctx context.Context, req *querypb.GetDataDistributionRequest) (*querypb.GetDataDistributionResponse, error)
func (*QueryNode) GetMetrics ¶
func (node *QueryNode) GetMetrics(ctx context.Context, req *milvuspb.GetMetricsRequest) (*milvuspb.GetMetricsResponse, error)
GetMetrics return system infos of the query node, such as total memory, memory usage, cpu usage ...
func (*QueryNode) GetSegmentInfo ¶
func (node *QueryNode) GetSegmentInfo(ctx context.Context, in *querypb.GetSegmentInfoRequest) (*querypb.GetSegmentInfoResponse, error)
GetSegmentInfo returns segment information of the collection on the queryNode, and the information includes memSize, numRow, indexName, indexID ...
func (*QueryNode) GetStatistics ¶
func (node *QueryNode) GetStatistics(ctx context.Context, req *querypb.GetStatisticsRequest) (*internalpb.GetStatisticsResponse, error)
GetStatistics returns loaded statistics of collection.
func (*QueryNode) GetStatisticsChannel ¶
func (node *QueryNode) GetStatisticsChannel(ctx context.Context, req *internalpb.GetStatisticsChannelRequest) (*milvuspb.StringResponse, error)
GetStatisticsChannel returns the statistics channel Statistics channel contains statistics infos of query nodes, such as segment infos, memory infos
func (*QueryNode) GetTimeTickChannel ¶
func (node *QueryNode) GetTimeTickChannel(ctx context.Context, req *internalpb.GetTimeTickChannelRequest) (*milvuspb.StringResponse, error)
GetTimeTickChannel returns the time tick channel TimeTickChannel contains many time tick messages, which will be sent by query nodes
func (*QueryNode) InitSegcore ¶
InitSegcore set init params of segCore, such as chunckRows, SIMD type...
func (*QueryNode) LoadPartitions ¶
func (*QueryNode) LoadSegments ¶
func (node *QueryNode) LoadSegments(ctx context.Context, req *querypb.LoadSegmentsRequest) (*commonpb.Status, error)
LoadSegments load historical data into query node, historical data can be vector data or index
func (*QueryNode) Query ¶
func (node *QueryNode) Query(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
Query performs replica query tasks.
func (*QueryNode) QuerySegments ¶
func (node *QueryNode) QuerySegments(ctx context.Context, req *querypb.QueryRequest) (*internalpb.RetrieveResults, error)
only used for delegator query segments from worker
func (*QueryNode) QueryStream ¶
func (node *QueryNode) QueryStream(req *querypb.QueryRequest, srv querypb.QueryNode_QueryStreamServer) error
func (*QueryNode) QueryStreamSegments ¶
func (node *QueryNode) QueryStreamSegments(req *querypb.QueryRequest, srv querypb.QueryNode_QueryStreamSegmentsServer) error
func (*QueryNode) ReleaseCollection ¶
func (node *QueryNode) ReleaseCollection(ctx context.Context, in *querypb.ReleaseCollectionRequest) (*commonpb.Status, error)
ReleaseCollection clears all data related to this collection on the querynode
func (*QueryNode) ReleasePartitions ¶
func (node *QueryNode) ReleasePartitions(ctx context.Context, req *querypb.ReleasePartitionsRequest) (*commonpb.Status, error)
ReleasePartitions clears all data related to this partition on the querynode
func (*QueryNode) ReleaseSegments ¶
func (node *QueryNode) ReleaseSegments(ctx context.Context, req *querypb.ReleaseSegmentsRequest) (*commonpb.Status, error)
ReleaseSegments remove the specified segments from query node according segmentIDs, partitionIDs, and collectionID
func (*QueryNode) Search ¶
func (node *QueryNode) Search(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
Search performs replica search tasks.
func (*QueryNode) SearchSegments ¶
func (node *QueryNode) SearchSegments(ctx context.Context, req *querypb.SearchRequest) (*internalpb.SearchResults, error)
only used for shard delegator search segments from worker
func (*QueryNode) SetAddress ¶
func (*QueryNode) SetEtcdClient ¶
SetEtcdClient assigns parameter client to its member etcdCli
func (*QueryNode) ShowConfigurations ¶
func (node *QueryNode) ShowConfigurations(ctx context.Context, req *internalpb.ShowConfigurationsRequest) (*internalpb.ShowConfigurationsResponse, error)
ShowConfigurations returns the configurations of queryNode matching req.Pattern
func (*QueryNode) Stop ¶
Stop mainly stop QueryNode's query service, historical loop and streaming loop.
func (*QueryNode) SyncDistribution ¶
func (*QueryNode) SyncReplicaSegments ¶
func (node *QueryNode) SyncReplicaSegments(ctx context.Context, req *querypb.SyncReplicaSegmentsRequest) (*commonpb.Status, error)
SyncReplicaSegments syncs replica node & segments states
func (*QueryNode) UnsubDmChannel ¶
func (*QueryNode) UpdateStateCode ¶
UpdateStateCode updata the state of query node, which can be initializing, healthy, and abnormal
func (*QueryNode) WatchDmChannels ¶
func (node *QueryNode) WatchDmChannels(ctx context.Context, req *querypb.WatchDmChannelsRequest) (status *commonpb.Status, e error)
WatchDmChannels create consumers on dmChannels to receive Incremental data,which is the important part of real-time query
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
delegator package contains the logic of shard delegator.
|
delegator package contains the logic of shard delegator. |
delegator package contains the logic of shard delegator.
|
delegator package contains the logic of shard delegator. |
pkoracle package contains pk - segment mapping logic.
|
pkoracle package contains pk - segment mapping logic. |