Documentation ¶
Overview ¶
Package mds provides the overall interface to Metadata Services.
Index ¶
- type Config
- type MDS
- func (m *MDS) CheckInNode(ctx context.Context, node *dax.Node) error
- func (m *MDS) ComputeNodes(ctx context.Context, qtid dax.QualifiedTableID, shardNums ...dax.ShardNum) ([]dax.ComputeNode, error)
- func (m *MDS) CreateDatabase(ctx context.Context, qdb *dax.QualifiedDatabase) error
- func (m *MDS) CreateField(ctx context.Context, qtid dax.QualifiedTableID, fld *dax.Field) error
- func (m *MDS) CreateTable(ctx context.Context, qtbl *dax.QualifiedTable) error
- func (m *MDS) DatabaseByID(ctx context.Context, qdbid dax.QualifiedDatabaseID) (*dax.QualifiedDatabase, error)
- func (m *MDS) DatabaseByName(ctx context.Context, orgID dax.OrganizationID, dbname dax.DatabaseName) (*dax.QualifiedDatabase, error)
- func (m *MDS) Databases(ctx context.Context, orgID dax.OrganizationID, ids ...dax.DatabaseID) ([]*dax.QualifiedDatabase, error)
- func (m *MDS) DebugNodes(ctx context.Context) ([]*dax.Node, error)
- func (m *MDS) DeregisterNodes(ctx context.Context, addrs ...dax.Address) error
- func (m *MDS) DropDatabase(ctx context.Context, qdbid dax.QualifiedDatabaseID) error
- func (m *MDS) DropField(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
- func (m *MDS) DropTable(ctx context.Context, qtid dax.QualifiedTableID) error
- func (m *MDS) IngestPartition(ctx context.Context, qtid dax.QualifiedTableID, partnNum dax.PartitionNum) (dax.Address, error)
- func (m *MDS) IngestShard(ctx context.Context, qtid dax.QualifiedTableID, shrdNum dax.ShardNum) (dax.Address, error)
- func (m *MDS) RegisterNode(ctx context.Context, node *dax.Node) error
- func (m *MDS) RegisterNodes(ctx context.Context, nodes ...*dax.Node) error
- func (m *MDS) SnapshotFieldKeys(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
- func (m *MDS) SnapshotShardData(ctx context.Context, qtid dax.QualifiedTableID, shardNum dax.ShardNum) error
- func (m *MDS) SnapshotTable(ctx context.Context, qtid dax.QualifiedTableID) error
- func (m *MDS) SnapshotTableKeys(ctx context.Context, qtid dax.QualifiedTableID, partitionNum dax.PartitionNum) error
- func (m *MDS) Start() error
- func (m *MDS) Stop() error
- func (m *MDS) TableByID(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
- func (m *MDS) TableByName(ctx context.Context, qdbid dax.QualifiedDatabaseID, name dax.TableName) (*dax.QualifiedTable, error)
- func (m *MDS) Tables(ctx context.Context, qdbid dax.QualifiedDatabaseID, ids ...dax.TableID) ([]*dax.QualifiedTable, error)
- func (m *MDS) TranslateNodes(ctx context.Context, qtid dax.QualifiedTableID, ...) ([]dax.TranslateNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // TODO(jaffee) director on config is a bit weird? Shouldn't this be set up internally? Director controller.Director `toml:"-"` // RegistrationBatchTimeout is the time that the controller will // wait after a node registers itself to see if any more nodes // will register before sending out directives to all nodes which // have been registered. RegistrationBatchTimeout time.Duration `toml:"registration-batch-timeout"` SnappingTurtleTimeout time.Duration // Poller PollInterval time.Duration `toml:"poll-interval"` // Storage StorageMethod string `toml:"-"` DataDir string `toml:"-"` SnapshotterDir string `toml:"snapshotter-dir"` WriteloggerDir string `toml:"writelogger-dir"` // Logger Logger logger.Logger `toml:"-"` }
type MDS ¶
type MDS struct {
// contains filtered or unexported fields
}
MDS provides public MDS methods for an MDS service.
func (*MDS) CheckInNode ¶
CheckInNode handles a node check-in request. If MDS is not aware of the node, it will be sent through the RegisterNode process.
func (*MDS) ComputeNodes ¶
func (m *MDS) ComputeNodes(ctx context.Context, qtid dax.QualifiedTableID, shardNums ...dax.ShardNum) ([]dax.ComputeNode, error)
ComputeNodes gets the compute nodes responsible for the table/shards specified in the ComputeNodeRequest.
func (*MDS) CreateDatabase ¶ added in v3.29.0
CreateDatabase handles a create table request.
func (*MDS) CreateField ¶
CreateField handles a create Field request.
func (*MDS) CreateTable ¶
CreateTable handles a create table request.
func (*MDS) DatabaseByID ¶ added in v3.29.0
func (m *MDS) DatabaseByID(ctx context.Context, qdbid dax.QualifiedDatabaseID) (*dax.QualifiedDatabase, error)
func (*MDS) DatabaseByName ¶ added in v3.29.0
func (m *MDS) DatabaseByName(ctx context.Context, orgID dax.OrganizationID, dbname dax.DatabaseName) (*dax.QualifiedDatabase, error)
func (*MDS) Databases ¶ added in v3.29.0
func (m *MDS) Databases(ctx context.Context, orgID dax.OrganizationID, ids ...dax.DatabaseID) ([]*dax.QualifiedDatabase, error)
func (*MDS) DeregisterNodes ¶
DeregisterNodes handles a request to deregister multiple nodes at once.
func (*MDS) DropDatabase ¶ added in v3.29.0
func (*MDS) DropField ¶
func (m *MDS) DropField(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
DropField handles a drop Field request.
func (*MDS) DropTable ¶
DropTable handles a drop table request. // TODO(jaffee) how do we reason about consistency here? What if controller DropTable succeeds, but schemar fails?
func (*MDS) IngestPartition ¶
func (m *MDS) IngestPartition(ctx context.Context, qtid dax.QualifiedTableID, partnNum dax.PartitionNum) (dax.Address, error)
IngestPartition handles an ingest partition request.
func (*MDS) IngestShard ¶
func (m *MDS) IngestShard(ctx context.Context, qtid dax.QualifiedTableID, shrdNum dax.ShardNum) (dax.Address, error)
IngestShard handles an ingest shard request.
func (*MDS) RegisterNode ¶
RegisterNode handles a node registration request. It does not synchronously do much of anything, but the node will eventually probably get a directive... unless the MDS crashes or something in which case the fact that this endpoint was ever called will be lost to time.
func (*MDS) RegisterNodes ¶
RegisterNodes immediately registers the given nodes and sends out new directives synchronously, bypassing the wait time of the RegisterNode endpoint.
func (*MDS) SnapshotFieldKeys ¶
func (m *MDS) SnapshotFieldKeys(ctx context.Context, qtid dax.QualifiedTableID, fldName dax.FieldName) error
SnapshotFieldKeys handles a snapshot field/keys request.
func (*MDS) SnapshotShardData ¶
func (m *MDS) SnapshotShardData(ctx context.Context, qtid dax.QualifiedTableID, shardNum dax.ShardNum) error
SnapshotShardData handles a snapshot shard request.
func (*MDS) SnapshotTable ¶
SnapshotTable handles a snapshot table request.
func (*MDS) SnapshotTableKeys ¶
func (m *MDS) SnapshotTableKeys(ctx context.Context, qtid dax.QualifiedTableID, partitionNum dax.PartitionNum) error
SnapshotTableKeys handles a snapshot table/keys request.
func (*MDS) Stop ¶
Stop stops MDS services, such as the Poller and the controller's node registration routine.
func (*MDS) TableByID ¶ added in v3.29.0
func (m *MDS) TableByID(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
TableByID handles a table request.
func (*MDS) TableByName ¶ added in v3.29.0
func (m *MDS) TableByName(ctx context.Context, qdbid dax.QualifiedDatabaseID, name dax.TableName) (*dax.QualifiedTable, error)
TableByName handles a table id (i.e. by name) request.
func (*MDS) Tables ¶
func (m *MDS) Tables(ctx context.Context, qdbid dax.QualifiedDatabaseID, ids ...dax.TableID) ([]*dax.QualifiedTable, error)
Tables handles a tables request.
func (*MDS) TranslateNodes ¶
func (m *MDS) TranslateNodes(ctx context.Context, qtid dax.QualifiedTableID, partitionNums ...dax.PartitionNum) ([]dax.TranslateNode, error)
TranslateNodes gets the translate nodes responsible for the table/partitions specified in the TranslateNodeRequest.
Directories ¶
Path | Synopsis |
---|---|
Package client is an HTTP client for MDS.
|
Package client is an HTTP client for MDS. |
Package controller provides the core Controller struct.
|
Package controller provides the core Controller struct. |
balancer
Package balancer is an implementation of the controller's Balancer interface.
|
Package balancer is an implementation of the controller's Balancer interface. |
balancer/boltdb
Package boltdb contains the boltdb implementation of the Balancer interface.
|
Package boltdb contains the boltdb implementation of the Balancer interface. |
http
Package http provides the http implementation of the Director interface.
|
Package http provides the http implementation of the Director interface. |
partitioner
Package partitioner provides the Partitioner type, which provides helper methods for determining partitions based on string keys.
|
Package partitioner provides the Partitioner type, which provides helper methods for determining partitions based on string keys. |
Package poller provides the core Poller struct.
|
Package poller provides the core Poller struct. |
Package schemar provides the core Schemar interface.
|
Package schemar provides the core Schemar interface. |
boltdb
Package boltdb contains the boltdb implementation of the Schemar interfaces.
|
Package boltdb contains the boltdb implementation of the Schemar interfaces. |