Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchQueryShard ¶
type BatchQueryShard struct { Queries []tproto.BoundQuery Keyspace string Shards []string TabletType topo.TabletType Session *Session }
BatchQueryShard represents a batch query request for the specified shards.
func (*BatchQueryShard) MarshalBson ¶
func (batchQueryShard *BatchQueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes BatchQueryShard.
func (*BatchQueryShard) UnmarshalBson ¶
func (batchQueryShard *BatchQueryShard) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into BatchQueryShard.
type EntityId ¶
type EntityId struct { ExternalID interface{} KeyspaceID kproto.KeyspaceId }
EntityId represents a tuple of external_id and keyspace_id
func (*EntityId) MarshalBson ¶
func (entityId *EntityId) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes EntityId.
type EntityIdsQuery ¶
type EntityIdsQuery struct { Sql string BindVariables map[string]interface{} Keyspace string EntityColumnName string EntityKeyspaceIDs []EntityId TabletType topo.TabletType Session *Session }
EntityIdsQuery represents a query request for the specified KeyspaceId map.
func (*EntityIdsQuery) MarshalBson ¶
func (entityIdsQuery *EntityIdsQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes EntityIdsQuery.
func (*EntityIdsQuery) UnmarshalBson ¶
func (entityIdsQuery *EntityIdsQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into EntityIdsQuery.
type GetMRSplitsRequest ¶
type GetMRSplitsRequest struct { Keyspace string Query tproto.BoundQuery SplitsPerShard int }
GetMRSplitsRequest is the request to fetch input splits for a MapReduce job.
type GetMRSplitsResult ¶
type GetMRSplitsResult struct {
Splits []InputSplit
}
Result for GetMRSplitsRequest
type InputSplit ¶
type InputSplit struct { Query *KeyRangeQuery Size int64 }
InputSplit is a slice of table typically assigned to a single Mapper
type KeyRangeQuery ¶
type KeyRangeQuery struct { Sql string BindVariables map[string]interface{} Keyspace string KeyRanges []kproto.KeyRange TabletType topo.TabletType Session *Session }
KeyRangeQuery represents a query request for the specified list of keyranges.
func (*KeyRangeQuery) MarshalBson ¶
func (keyRangeQuery *KeyRangeQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes KeyRangeQuery.
func (*KeyRangeQuery) UnmarshalBson ¶
func (keyRangeQuery *KeyRangeQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into KeyRangeQuery.
type KeyspaceIdBatchQuery ¶
type KeyspaceIdBatchQuery struct { Queries []tproto.BoundQuery Keyspace string KeyspaceIds []kproto.KeyspaceId TabletType topo.TabletType Session *Session }
KeyspaceIdBatchQuery represents a batch query request for the specified keyspace IDs.
func (*KeyspaceIdBatchQuery) MarshalBson ¶
func (keyspaceIdBatchQuery *KeyspaceIdBatchQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes KeyspaceIdBatchQuery.
func (*KeyspaceIdBatchQuery) UnmarshalBson ¶
func (keyspaceIdBatchQuery *KeyspaceIdBatchQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into KeyspaceIdBatchQuery.
type KeyspaceIdQuery ¶
type KeyspaceIdQuery struct { Sql string BindVariables map[string]interface{} Keyspace string KeyspaceIds []kproto.KeyspaceId TabletType topo.TabletType Session *Session }
KeyspaceIdQuery represents a query request for the specified list of keyspace IDs.
func (*KeyspaceIdQuery) MarshalBson ¶
func (keyspaceIdQuery *KeyspaceIdQuery) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes KeyspaceIdQuery.
func (*KeyspaceIdQuery) UnmarshalBson ¶
func (keyspaceIdQuery *KeyspaceIdQuery) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into KeyspaceIdQuery.
type QueryResult ¶
type QueryResult struct { Result *mproto.QueryResult Session *Session Error string }
QueryResult is mproto.QueryResult+Session (for now).
func (*QueryResult) MarshalBson ¶
func (queryResult *QueryResult) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes QueryResult.
func (*QueryResult) UnmarshalBson ¶
func (queryResult *QueryResult) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into QueryResult.
type QueryResultList ¶
type QueryResultList struct { List []mproto.QueryResult Session *Session Error string }
QueryResultList is mproto.QueryResultList+Session
type QueryShard ¶
type QueryShard struct { Sql string BindVariables map[string]interface{} Keyspace string Shards []string TabletType topo.TabletType Session *Session }
QueryShard represents a query request for the specified list of shards.
func (*QueryShard) MarshalBson ¶
func (queryShard *QueryShard) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes QueryShard.
func (*QueryShard) UnmarshalBson ¶
func (queryShard *QueryShard) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into QueryShard.
type Session ¶
type Session struct { InTransaction bool ShardSessions []*ShardSession }
Session represents the session state. It keeps track of the shards on which transactions are in progress, along with the corresponding tranaction ids.
func (*Session) MarshalBson ¶
func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes Session.
type ShardSession ¶
type ShardSession struct { Keyspace string Shard string TabletType topo.TabletType TransactionId int64 }
ShardSession represents the session state for a shard.
func (*ShardSession) MarshalBson ¶
func (shardSession *ShardSession) MarshalBson(buf *bytes2.ChunkedWriter, key string)
MarshalBson bson-encodes ShardSession.
func (*ShardSession) String ¶
func (shardSession *ShardSession) String() string
func (*ShardSession) UnmarshalBson ¶
func (shardSession *ShardSession) UnmarshalBson(buf *bytes.Buffer, kind byte)
UnmarshalBson bson-decodes into ShardSession.