Documentation
¶
Overview ¶
Package mds provides the overall interface to Metadata Services.
Index ¶
- type Config
- type CreateFieldRequest
- type DropFieldResponse
- 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) ([]controller.ComputeNode, 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) DebugNodes(ctx context.Context) ([]*dax.Node, error)
- func (m *MDS) DeregisterNodes(ctx context.Context, addrs ...dax.Address) 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) Table(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
- func (m *MDS) TableID(ctx context.Context, qual dax.TableQualifier, name dax.TableName) (dax.QualifiedTableID, error)
- func (m *MDS) Tables(ctx context.Context, qual dax.TableQualifier, ids ...dax.TableID) ([]*dax.QualifiedTable, error)
- func (m *MDS) TranslateNodes(ctx context.Context, qtid dax.QualifiedTableID, ...) ([]controller.TranslateNode, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Controller
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"`
// Poller
PollInterval time.Duration `toml:"poll-interval"`
// Storage
StorageMethod string `toml:"-"`
DataDir string `toml:"-"`
// Logger
Logger logger.Logger `toml:"-"`
}
type DropFieldResponse ¶
type DropFieldResponse struct{}
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) ([]controller.ComputeNode, error)
ComputeNodes gets the compute nodes responsible for the table/shards specified in the ComputeNodeRequest.
func (*MDS) CreateField ¶
CreateField handles a create Field request.
func (*MDS) CreateTable ¶
CreateTable handles a create table request.
func (*MDS) DeregisterNodes ¶
DeregisterNodes handles a request to deregister multiple nodes at once.
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) Table ¶
func (m *MDS) Table(ctx context.Context, qtid dax.QualifiedTableID) (*dax.QualifiedTable, error)
Table handles a table request.
func (*MDS) TableID ¶
func (m *MDS) TableID(ctx context.Context, qual dax.TableQualifier, name dax.TableName) (dax.QualifiedTableID, error)
TableID handles a table id (i.e. by name) request.
func (*MDS) Tables ¶
func (m *MDS) Tables(ctx context.Context, qual dax.TableQualifier, 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) ([]controller.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. |
|
alpha
Package alpha contains inter-service implemenations of interfaces.
|
Package alpha contains inter-service implemenations of interfaces. |
|
http
Package http provides the http implementation of the Director interface.
|
Package http provides the http implementation of the Director interface. |
|
naive
Package naive contains a naive implementation of the Balancer interface.
|
Package naive contains a naive implementation of the Balancer interface. |
|
naive/boltdb
Package boltdb contains the boltdb implementation of the Balancer interface.
|
Package boltdb contains the boltdb implementation of the Balancer 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. |