grpcdatacoordclient

package
v0.10.3-0...-930112e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewClient

func NewClient(ctx context.Context) (types.DataCoordClient, error)

NewClient creates a new client instance

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the datacoord grpc client

func (*Client) AllocSegment

func (*Client) AlterIndex

func (c *Client) AlterIndex(ctx context.Context, req *indexpb.AlterIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

AlterIndex sends the alter index request to IndexCoord.

func (*Client) AssignSegmentID

AssignSegmentID applies allocations for specified Coolection/Partition and related Channel Name(Virtial Channel)

ctx is the context to control request deadline and cancellation req contains the requester's info(id and role) and the list of Assignment Request, which contains the specified collection, partitaion id, the related VChannel Name and row count it needs

response struct `AssignSegmentIDResponse` contains the assignment result for each request error is returned only when some communication issue occurs if some error occurs in the process of `AssignSegmentID`, it will be recorded and returned in `Status` field of response

`AssignSegmentID` will applies current configured allocation policies for each request if the VChannel is newly used, `WatchDmlChannels` will be invoked to notify a `DataNode`(selected by policy) to watch it if there is anything make the allocation impossible, the response will not contain the corresponding result

func (*Client) BroadcastAlteredCollection

func (c *Client) BroadcastAlteredCollection(ctx context.Context, req *datapb.AlterCollectionRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

BroadcastAlteredCollection is the DataCoord client side code for BroadcastAlteredCollection call.

func (*Client) CheckHealth

func (*Client) Close

func (c *Client) Close() error

Stop stops the client

func (*Client) CreateIndex

func (c *Client) CreateIndex(ctx context.Context, req *indexpb.CreateIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

CreateIndex sends the build index request to IndexCoord.

func (*Client) DescribeIndex

DescribeIndex describe the index info of the collection.

func (*Client) DropIndex

func (c *Client) DropIndex(ctx context.Context, req *indexpb.DropIndexRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

DropIndex sends the drop index request to IndexCoord.

func (*Client) DropVirtualChannel

DropVirtualChannel drops virtual channel in datacoord.

func (*Client) Flush

func (c *Client) Flush(ctx context.Context, req *datapb.FlushRequest, opts ...grpc.CallOption) (*datapb.FlushResponse, error)

Flush flushes a collection's data

func (*Client) GcConfirm

func (*Client) GcControl

func (c *Client) GcControl(ctx context.Context, req *datapb.GcControlRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

func (*Client) GetChannelRecoveryInfo

GetChannelRecoveryInfo returns the corresponding vchannel info.

func (*Client) GetCollectionStatistics

GetCollectionStatistics requests collection statistics

ctx is the context to control request deadline and cancellation req contains the collection id to query

response struct `GetCollectionStatisticsResponse` contains the key-value list fields returning related data

only row count for now

error is returned only when some communication issue occurs

func (*Client) GetCompactionState

GetCompactionState gets the state of a compaction

func (*Client) GetCompactionStateWithPlans

func (c *Client) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb.GetCompactionPlansRequest, opts ...grpc.CallOption) (*milvuspb.GetCompactionPlansResponse, error)

GetCompactionStateWithPlans gets the state of a compaction by plan

func (*Client) GetComponentStates

GetComponentStates calls DataCoord GetComponentStates services

func (*Client) GetFlushAllState

GetFlushAllState checks if all DML messages before `FlushAllTs` have been flushed.

func (*Client) GetFlushState

GetFlushState gets the flush state of the collection based on the provided flush ts and segment IDs.

func (*Client) GetFlushedSegments

GetFlushedSegments returns flushed segment list of requested collection/parition

ctx is the context to control request deadline and cancellation req contains the collection/partition id to query

when partition is lesser or equal to 0, all flushed segments of collection will be returned

response struct `GetFlushedSegmentsResponse` contains flushed segment id list error is returned only when some communication issue occurs

func (*Client) GetIndexBuildProgress

GetIndexBuildProgress describe the progress of the index.

func (*Client) GetIndexInfos

GetIndexInfos gets the index file paths from IndexCoord.

func (*Client) GetIndexState

GetIndexState gets the index states from IndexCoord.

func (*Client) GetIndexStatistics

GetIndexStatistics get the statistics of the index.

func (*Client) GetInsertBinlogPaths

GetInsertBinlogPaths requests binlog paths for specified segment

ctx is the context to control request deadline and cancellation req contains the segment id to query

response struct `GetInsertBinlogPathsResponse` contains the fields list

and corresponding binlog path list

error is returned only when some communication issue occurs

func (*Client) GetMetrics

GetMetrics gets all metrics of datacoord

func (*Client) GetPartitionStatistics

GetPartitionStatistics requests partition statistics

ctx is the context to control request deadline and cancellation req contains the collection and partition id to query

response struct `GetPartitionStatisticsResponse` contains the key-value list fields returning related data

only row count for now

error is returned only when some communication issue occurs

func (*Client) GetRecoveryInfo

GetRecoveryInfo request segment recovery info of collection/partition

ctx is the context to control request deadline and cancellation req contains the collection/partition id to query

response struct `GetRecoveryInfoResponse` contains the list of segments info and corresponding vchannel info error is returned only when some communication issue occurs

func (*Client) GetRecoveryInfoV2

GetRecoveryInfoV2 request segment recovery info of collection/partitions

ctx is the context to control request deadline and cancellation req contains the collection/partitions id to query

response struct `GetRecoveryInfoResponseV2` contains the list of segments info and corresponding vchannel info error is returned only when some communication issue occurs

func (*Client) GetSegmentIndexState

GetSegmentIndexState gets the index states from IndexCoord.

func (*Client) GetSegmentInfo

GetSegmentInfo requests segment info

ctx is the context to control request deadline and cancellation req contains the list of segment ids to query

response struct `GetSegmentInfoResponse` contains the list of segment info error is returned only when some communication issue occurs

func (*Client) GetSegmentInfoChannel

func (c *Client) GetSegmentInfoChannel(ctx context.Context, _ *datapb.GetSegmentInfoChannelRequest, opts ...grpc.CallOption) (*milvuspb.StringResponse, error)

GetSegmentInfoChannel DEPRECATED legacy api to get SegmentInfo Channel name

func (*Client) GetSegmentStates

GetSegmentStates requests segment state information

ctx is the context to control request deadline and cancellation req contains the list of segment id to query

response struct `GetSegmentStatesResponse` contains the list of each state query result

when the segment is not found, the state entry will has the field `Status`  to identify failure
otherwise the Segment State and Start position information will be returned

error is returned only when some communication issue occurs

func (*Client) GetSegmentsByStates

GetSegmentsByStates returns segment list of requested collection/partition and segment states

ctx is the context to control request deadline and cancellation req contains the collection/partition id and segment states to query when partition is lesser or equal to 0, all segments of collection will be returned

response struct `GetSegmentsByStatesResponse` contains segment id list error is returned only when some communication issue occurs

func (*Client) GetStatisticsChannel

GetStatisticsChannel return the name of statistics channel.

func (*Client) GetTimeTickChannel

GetTimeTickChannel return the name of time tick channel.

func (*Client) ImportV2

func (*Client) ListIndexes

func (*Client) ManualCompaction

ManualCompaction triggers a compaction for a collection

func (*Client) MarkSegmentsDropped

func (c *Client) MarkSegmentsDropped(ctx context.Context, req *datapb.MarkSegmentsDroppedRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

func (*Client) ReportDataNodeTtMsgs

func (c *Client) ReportDataNodeTtMsgs(ctx context.Context, req *datapb.ReportDataNodeTtMsgsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

func (*Client) SaveBinlogPaths

func (c *Client) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPathsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

SaveBinlogPaths updates segments binlogs(including insert binlogs, stats logs and delta logs)

and related message stream positions

ctx is the context to control request deadline and cancellation req contains the collection/partition id to query

response status contains the status/error code and failing reason if any error is returned only when some communication issue occurs

there is a constraint that the `SaveBinlogPaths` requests of same segment shall be passed in sequence

	the root reason is each `SaveBinlogPaths` will overwrite the checkpoint position
 if the constraint is broken, the checkpoint position will not be monotonically increasing and the integrity will be compromised

func (*Client) SetSegmentState

SetSegmentState sets the state of a given segment.

func (*Client) ShowConfigurations

ShowConfigurations gets specified configurations para of DataCoord

func (*Client) UpdateChannelCheckpoint

func (c *Client) UpdateChannelCheckpoint(ctx context.Context, req *datapb.UpdateChannelCheckpointRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

UpdateChannelCheckpoint updates channel checkpoint in dataCoord.

func (*Client) UpdateSegmentStatistics

func (c *Client) UpdateSegmentStatistics(ctx context.Context, req *datapb.UpdateSegmentStatisticsRequest, opts ...grpc.CallOption) (*commonpb.Status, error)

UpdateSegmentStatistics is the client side caller of UpdateSegmentStatistics.

func (*Client) WatchChannels

WatchChannels notifies DataCoord to watch vchannels of a collection

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL