Documentation
¶
Index ¶
- type CompactionCommandHandler
- func (h *CompactionCommandHandler) GetCompactionPlanUpdate(tx *bbolt.Tx, cmd *raft.Log, req *raft_log.GetCompactionPlanUpdateRequest) (*raft_log.GetCompactionPlanUpdateResponse, error)
- func (h *CompactionCommandHandler) UpdateCompactionPlan(tx *bbolt.Tx, cmd *raft.Log, req *raft_log.UpdateCompactionPlanRequest) (*raft_log.UpdateCompactionPlanResponse, error)
- type CompactionService
- type Config
- type IndexBlockFinder
- type IndexCommandHandler
- type IndexDeleter
- type IndexInserter
- type IndexPartitionLister
- type IndexQuerier
- type IndexReader
- type IndexReplacer
- type IndexService
- func (svc *IndexService) AddBlock(ctx context.Context, req *metastorev1.AddBlockRequest) (resp *metastorev1.AddBlockResponse, err error)
- func (svc *IndexService) AddRecoveredBlock(ctx context.Context, req *metastorev1.AddBlockRequest) (*metastorev1.AddBlockResponse, error)
- func (svc *IndexService) GetBlockMetadata(ctx context.Context, req *metastorev1.GetBlockMetadataRequest) (resp *metastorev1.GetBlockMetadataResponse, err error)
- func (svc *IndexService) TruncateIndex(ctx context.Context, rp retention.Policy) error
- type IndexWriter
- type Metastore
- type Overrides
- type PlacementStats
- type QueryService
- func (svc *QueryService) QueryMetadata(ctx context.Context, req *metastorev1.QueryMetadataRequest) (resp *metastorev1.QueryMetadataResponse, err error)
- func (svc *QueryService) QueryMetadataLabels(ctx context.Context, req *metastorev1.QueryMetadataLabelsRequest) (resp *metastorev1.QueryMetadataLabelsResponse, err error)
- type Raft
- type State
- type TenantIndex
- type TenantService
- type Tombstones
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompactionCommandHandler ¶
type CompactionCommandHandler struct {
// contains filtered or unexported fields
}
func NewCompactionCommandHandler ¶
func NewCompactionCommandHandler( logger log.Logger, index IndexReplacer, compactor compaction.Compactor, planner compaction.Planner, scheduler compaction.Scheduler, tombstones Tombstones, ) *CompactionCommandHandler
func (*CompactionCommandHandler) GetCompactionPlanUpdate ¶
func (h *CompactionCommandHandler) GetCompactionPlanUpdate( tx *bbolt.Tx, cmd *raft.Log, req *raft_log.GetCompactionPlanUpdateRequest, ) (*raft_log.GetCompactionPlanUpdateResponse, error)
func (*CompactionCommandHandler) UpdateCompactionPlan ¶
func (h *CompactionCommandHandler) UpdateCompactionPlan( tx *bbolt.Tx, cmd *raft.Log, req *raft_log.UpdateCompactionPlanRequest, ) (*raft_log.UpdateCompactionPlanResponse, error)
type CompactionService ¶
type CompactionService struct {
metastorev1.CompactionServiceServer
// contains filtered or unexported fields
}
func NewCompactionService ¶
func NewCompactionService( logger log.Logger, raft Raft, ) *CompactionService
func (*CompactionService) PollCompactionJobs ¶
func (svc *CompactionService) PollCompactionJobs( _ context.Context, req *metastorev1.PollCompactionJobsRequest, ) (*metastorev1.PollCompactionJobsResponse, error)
type Config ¶
type Config struct {
Address string `yaml:"address"`
GRPCClientConfig grpcclient.Config `yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the metastore."`
MinReadyDuration time.Duration `yaml:"min_ready_duration" category:"advanced"`
Raft raftnode.Config `yaml:"raft"`
FSM fsm.Config `yaml:",inline" category:"advanced"`
Index index.Config `yaml:"index" category:"advanced"`
Compactor compactor.Config `yaml:",inline" category:"advanced"`
Scheduler scheduler.Config `yaml:",inline" category:"advanced"`
}
func (*Config) RegisterFlags ¶
type IndexBlockFinder ¶
type IndexBlockFinder interface {
GetBlocks(*bbolt.Tx, *metastorev1.BlockList) ([]*metastorev1.BlockMeta, error)
}
type IndexCommandHandler ¶
type IndexCommandHandler struct {
// contains filtered or unexported fields
}
func NewIndexCommandHandler ¶
func NewIndexCommandHandler( logger log.Logger, index IndexWriter, tombstones Tombstones, compactor compaction.Compactor, ) *IndexCommandHandler
func (*IndexCommandHandler) AddBlock ¶
func (m *IndexCommandHandler) AddBlock(tx *bbolt.Tx, cmd *raft.Log, req *metastorev1.AddBlockRequest) (*metastorev1.AddBlockResponse, error)
func (*IndexCommandHandler) TruncateIndex ¶
func (m *IndexCommandHandler) TruncateIndex(tx *bbolt.Tx, cmd *raft.Log, req *raft_log.TruncateIndexRequest) (*raft_log.TruncateIndexResponse, error)
type IndexDeleter ¶
type IndexInserter ¶
type IndexInserter interface {
InsertBlock(*bbolt.Tx, *metastorev1.BlockMeta) error
}
type IndexPartitionLister ¶
type IndexQuerier ¶
type IndexReader ¶
type IndexReader interface {
IndexBlockFinder
IndexPartitionLister
}
type IndexReplacer ¶
type IndexReplacer interface {
ReplaceBlocks(*bbolt.Tx, *metastorev1.CompactedBlocks) error
}
type IndexService ¶
type IndexService struct {
metastorev1.IndexServiceServer
// contains filtered or unexported fields
}
func NewIndexService ¶
func NewIndexService( logger log.Logger, raft Raft, state State, index IndexReader, stats PlacementStats, ) *IndexService
func (*IndexService) AddBlock ¶
func (svc *IndexService) AddBlock( ctx context.Context, req *metastorev1.AddBlockRequest, ) (resp *metastorev1.AddBlockResponse, err error)
func (*IndexService) AddRecoveredBlock ¶
func (svc *IndexService) AddRecoveredBlock( ctx context.Context, req *metastorev1.AddBlockRequest, ) (*metastorev1.AddBlockResponse, error)
func (*IndexService) GetBlockMetadata ¶
func (svc *IndexService) GetBlockMetadata( ctx context.Context, req *metastorev1.GetBlockMetadataRequest, ) (resp *metastorev1.GetBlockMetadataResponse, err error)
func (*IndexService) TruncateIndex ¶
type IndexWriter ¶
type IndexWriter interface {
IndexInserter
IndexDeleter
}
type Metastore ¶
type Metastore struct {
// contains filtered or unexported fields
}
func New ¶
func New( config Config, overrides Overrides, logger log.Logger, reg prometheus.Registerer, healthService health.Service, client raftnodepb.RaftNodeServiceClient, bucket objstore.Bucket, placementMgr *placement.Manager, ) (*Metastore, error)
func (*Metastore) CheckReady ¶
CheckReady verifies if the metastore is ready to serve requests by ensuring the node is up-to-date with the leader's commit index.
type PlacementStats ¶
type QueryService ¶
type QueryService struct {
metastorev1.MetadataQueryServiceServer
// contains filtered or unexported fields
}
func NewQueryService ¶
func NewQueryService( logger log.Logger, state State, index IndexQuerier, ) *QueryService
func (*QueryService) QueryMetadata ¶
func (svc *QueryService) QueryMetadata( ctx context.Context, req *metastorev1.QueryMetadataRequest, ) (resp *metastorev1.QueryMetadataResponse, err error)
func (*QueryService) QueryMetadataLabels ¶
func (svc *QueryService) QueryMetadataLabels( ctx context.Context, req *metastorev1.QueryMetadataLabelsRequest, ) (resp *metastorev1.QueryMetadataLabelsResponse, err error)
type Raft ¶
Raft represents a Raft consensus protocol interface. Any modifications to the state should be proposed through the Raft interface.
type State ¶
State represents a consistent read-only view of the metastore. The write interface is provided through the FSM raft command handlers.
type TenantIndex ¶
type TenantIndex interface {
GetTenantStats(tx *bbolt.Tx, tenant string) *metastorev1.TenantStats
}
type TenantService ¶
type TenantService struct {
metastorev1.TenantServiceServer
// contains filtered or unexported fields
}
func NewTenantService ¶
func NewTenantService( logger log.Logger, state State, index TenantIndex, ) *TenantService
func (*TenantService) DeleteTenant ¶
func (svc *TenantService) DeleteTenant( context.Context, *metastorev1.DeleteTenantRequest, ) (*metastorev1.DeleteTenantResponse, error)
func (*TenantService) GetTenant ¶
func (svc *TenantService) GetTenant( ctx context.Context, req *metastorev1.GetTenantRequest, ) (resp *metastorev1.GetTenantResponse, err error)
type Tombstones ¶
type Tombstones interface {
AddTombstones(*bbolt.Tx, *raft.Log, *metastorev1.Tombstones) error
DeleteTombstones(*bbolt.Tx, *raft.Log, ...*metastorev1.Tombstones) error
Exists(tenant string, shard uint32, block string) bool
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.