Documentation ¶
Index ¶
- func CreateKeyspace(s *gocql.Session, keyspace string, replicas int, overwrite bool) (err error)
- func CreateKeyspaceNoSession(clusterHosts string, port int, keyspace string, replicas int, overwrite bool, ...) error
- func DropKeyspace(s *gocql.Session, keyspace string) (err error)
- func LoadSchema(cqlshpath string, fileName string, keyspace string) (err error)
- type CassandraMetadataService
- func (s *CassandraMetadataService) CreateConsumerGroup(ctx thrift.Context, request *shared.CreateConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
- func (s *CassandraMetadataService) CreateConsumerGroupExtent(ctx thrift.Context, request *shared.CreateConsumerGroupExtentRequest) error
- func (s *CassandraMetadataService) CreateConsumerGroupUUID(ctx thrift.Context, request *shared.CreateConsumerGroupUUIDRequest) (*shared.ConsumerGroupDescription, error)
- func (s *CassandraMetadataService) CreateDestination(ctx thrift.Context, request *shared.CreateDestinationRequest) (*shared.DestinationDescription, error)
- func (s *CassandraMetadataService) CreateDestinationUUID(ctx thrift.Context, uuidRequest *shared.CreateDestinationUUIDRequest) (*shared.DestinationDescription, error)
- func (s *CassandraMetadataService) CreateExtent(ctx thrift.Context, request *shared.CreateExtentRequest) (*shared.CreateExtentResult_, error)
- func (s *CassandraMetadataService) CreateHostInfo(ctx thrift.Context, request *m.CreateHostInfoRequest) error
- func (s *CassandraMetadataService) CreateServiceConfig(ctx thrift.Context, request *m.CreateServiceConfigRequest) error
- func (s *CassandraMetadataService) DeleteConsumerGroup(ctx thrift.Context, request *shared.DeleteConsumerGroupRequest) (e error)
- func (s *CassandraMetadataService) DeleteConsumerGroupUUID(ctx thrift.Context, request *m.DeleteConsumerGroupUUIDRequest) error
- func (s *CassandraMetadataService) DeleteDestination(ctx thrift.Context, deleteRequest *shared.DeleteDestinationRequest) error
- func (s *CassandraMetadataService) DeleteDestinationUUID(ctx thrift.Context, deleteRequest *m.DeleteDestinationUUIDRequest) error
- func (s *CassandraMetadataService) DeleteHostInfo(ctx thrift.Context, request *m.DeleteHostInfoRequest) error
- func (s *CassandraMetadataService) DeleteServiceConfig(ctx thrift.Context, request *m.DeleteServiceConfigRequest) error
- func (s *CassandraMetadataService) GetSession() *gocql.Session
- func (s *CassandraMetadataService) HostAddrToUUID(ctx thrift.Context, hostAddr string) (string, error)
- func (s *CassandraMetadataService) ListAllConsumerGroups(ctx thrift.Context, request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error)
- func (s *CassandraMetadataService) ListAllDestinations(ctx thrift.Context, listRequest *shared.ListDestinationsRequest) (*shared.ListDestinationsResult_, error)
- func (s *CassandraMetadataService) ListConsumerGroups(ctx thrift.Context, request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error)
- func (s *CassandraMetadataService) ListConsumerGroupsUUID(ctx thrift.Context, request *shared.ListConsumerGroupsUUIDRequest) (*shared.ListConsumerGroupsUUIDResult_, error)
- func (s *CassandraMetadataService) ListDestinationExtents(ctx thrift.Context, request *m.ListDestinationExtentsRequest) (*m.ListDestinationExtentsResult_, error)
- func (s *CassandraMetadataService) ListDestinations(ctx thrift.Context, listRequest *shared.ListDestinationsRequest) (*shared.ListDestinationsResult_, error)
- func (s *CassandraMetadataService) ListDestinationsByUUID(ctx thrift.Context, listRequest *shared.ListDestinationsByUUIDRequest) (*shared.ListDestinationsResult_, error)
- func (s *CassandraMetadataService) ListEntityOps(ctx thrift.Context, request *m.ListEntityOpsRequest) (*m.ListEntityOpsResult_, error)
- func (s *CassandraMetadataService) ListExtentsStats(ctx thrift.Context, request *shared.ListExtentsStatsRequest) (*shared.ListExtentsStatsResult_, error)
- func (s *CassandraMetadataService) ListHosts(ctx thrift.Context, listRequest *m.ListHostsRequest) (*m.ListHostsResult_, error)
- func (s *CassandraMetadataService) ListInputHostExtentsStats(ctx thrift.Context, request *m.ListInputHostExtentsStatsRequest) (*m.ListInputHostExtentsStatsResult_, error)
- func (s *CassandraMetadataService) ListStoreExtentsStats(ctx thrift.Context, request *m.ListStoreExtentsStatsRequest) (*m.ListStoreExtentsStatsResult_, error)
- func (s *CassandraMetadataService) MoveExtent(ctx thrift.Context, request *m.MoveExtentRequest) error
- func (s *CassandraMetadataService) ReadConsumerGroup(ctx thrift.Context, request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
- func (s *CassandraMetadataService) ReadConsumerGroupByUUID(ctx thrift.Context, request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
- func (s *CassandraMetadataService) ReadConsumerGroupExtent(ctx thrift.Context, request *m.ReadConsumerGroupExtentRequest) (*m.ReadConsumerGroupExtentResult_, error)
- func (s *CassandraMetadataService) ReadConsumerGroupExtents(ctx thrift.Context, request *shared.ReadConsumerGroupExtentsRequest) (*shared.ReadConsumerGroupExtentsResult_, error)
- func (s *CassandraMetadataService) ReadConsumerGroupExtentsByExtUUID(ctx thrift.Context, listRequest *m.ReadConsumerGroupExtentsByExtUUIDRequest) (*m.ReadConsumerGroupExtentsByExtUUIDResult_, error)
- func (s *CassandraMetadataService) ReadConsumerGroupExtentsLite(ctx thrift.Context, request *m.ReadConsumerGroupExtentsLiteRequest) (*m.ReadConsumerGroupExtentsLiteResult_, error)
- func (s *CassandraMetadataService) ReadDestination(ctx thrift.Context, getRequest *shared.ReadDestinationRequest) (result *shared.DestinationDescription, err error)
- func (s *CassandraMetadataService) ReadExtentStats(ctx thrift.Context, request *m.ReadExtentStatsRequest) (*m.ReadExtentStatsResult_, error)
- func (s *CassandraMetadataService) ReadHostInfo(ctx thrift.Context, request *m.ReadHostInfoRequest) (*m.ReadHostInfoResult_, error)
- func (s *CassandraMetadataService) ReadServiceConfig(ctx thrift.Context, request *m.ReadServiceConfigRequest) (*m.ReadServiceConfigResult_, error)
- func (s *CassandraMetadataService) ReadStoreExtentReplicaStats(ctx thrift.Context, request *m.ReadStoreExtentReplicaStatsRequest) (*m.ReadStoreExtentReplicaStatsResult_, error)
- func (s *CassandraMetadataService) RegisterHostUUID(ctx thrift.Context, request *m.RegisterHostUUIDRequest) error
- func (s *CassandraMetadataService) SealExtent(ctx thrift.Context, request *m.SealExtentRequest) error
- func (s *CassandraMetadataService) SetAckOffset(ctx thrift.Context, request *shared.SetAckOffsetRequest) error
- func (s *CassandraMetadataService) SetOutputHost(ctx thrift.Context, request *m.SetOutputHostRequest) error
- func (s *CassandraMetadataService) UUIDToHostAddr(ctx thrift.Context, hostUUID string) (string, error)
- func (s *CassandraMetadataService) UpdateConsumerGroup(ctx thrift.Context, request *shared.UpdateConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
- func (s *CassandraMetadataService) UpdateConsumerGroupExtentStatus(ctx thrift.Context, request *shared.UpdateConsumerGroupExtentStatusRequest) error
- func (s *CassandraMetadataService) UpdateDestination(ctx thrift.Context, updateRequest *shared.UpdateDestinationRequest) (*shared.DestinationDescription, error)
- func (s *CassandraMetadataService) UpdateDestinationDLQCursors(ctx thrift.Context, updateRequest *m.UpdateDestinationDLQCursorsRequest) (existing *shared.DestinationDescription, err error)
- func (s *CassandraMetadataService) UpdateExtentReplicaStats(ctx thrift.Context, request *m.UpdateExtentReplicaStatsRequest) error
- func (s *CassandraMetadataService) UpdateExtentStats(ctx thrift.Context, request *m.UpdateExtentStatsRequest) (*m.UpdateExtentStatsResult_, error)
- func (s *CassandraMetadataService) UpdateHostInfo(ctx thrift.Context, request *m.UpdateHostInfoRequest) error
- func (s *CassandraMetadataService) UpdateServiceConfig(ctx thrift.Context, request *m.UpdateServiceConfigRequest) error
- func (s *CassandraMetadataService) UpdateStoreExtentReplicaStats(ctx thrift.Context, request *m.UpdateStoreExtentReplicaStatsRequest) error
- type Client
- type TestCluster
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateKeyspace ¶
CreateKeyspace creates the keyspace on this session with the given replicas
func CreateKeyspaceNoSession ¶
func CreateKeyspaceNoSession( clusterHosts string, port int, keyspace string, replicas int, overwrite bool, auth configure.Authentication, ) error
CreateKeyspaceNoSession is used to create a keyspace when we don't have a session
func DropKeyspace ¶
DropKeyspace drops the given keyspace, if it exists
Types ¶
type CassandraMetadataService ¶
type CassandraMetadataService struct {
// contains filtered or unexported fields
}
CassandraMetadataService Implements TChanMetadataServiceClient interface TODO: Convert all errors to the ones defined in the thrift API.
func NewCassandraMetadataService ¶
func NewCassandraMetadataService(cfg configure.CommonMetadataConfig, log bark.Logger) (*CassandraMetadataService, error)
NewCassandraMetadataService creates an instance of TChanMetadataServiceClient backed up by Cassandra.
func (*CassandraMetadataService) CreateConsumerGroup ¶
func (s *CassandraMetadataService) CreateConsumerGroup(ctx thrift.Context, request *shared.CreateConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
CreateConsumerGroup creates a consumer group.
func (*CassandraMetadataService) CreateConsumerGroupExtent ¶
func (s *CassandraMetadataService) CreateConsumerGroupExtent(ctx thrift.Context, request *shared.CreateConsumerGroupExtentRequest) error
CreateConsumerGroupExtent creates a [ConsumerGroup, Extent, OutputHost] mapping If the mapping already exist, this method will overwrite the existing mapping
func (*CassandraMetadataService) CreateConsumerGroupUUID ¶ added in v1.26.0
func (s *CassandraMetadataService) CreateConsumerGroupUUID(ctx thrift.Context, request *shared.CreateConsumerGroupUUIDRequest) (*shared.ConsumerGroupDescription, error)
CreateConsumerGroupUUID creates a ConsumerGroup for the given destination, if it doesn't already exist ConsumerGroups are tied to a destination path, so the same ConsumerGroupName can be used across multiple destination paths. If the requested [destinationPath, consumerGroupName] already exists, this method will return an EntityAlreadyExistsError.
func (*CassandraMetadataService) CreateDestination ¶
func (s *CassandraMetadataService) CreateDestination(ctx thrift.Context, request *shared.CreateDestinationRequest) (*shared.DestinationDescription, error)
CreateDestination implements the corresponding TChanMetadataServiceClient API Cassandra doesn't support conditional (IF NOT EXISTS) updates across multiple tables. The workaround is to create a record in "destinations" table and then insert a corresponding record into the "destinations_by_path" table using IF NOT EXISTS. If the insert into "destinations_by_path" is rejected due to the record existance tries to cleanup the orphaned record from "destinations" and returns "AlradyExists" error. Cleanup failure is not a problem as the destination that is not referenced by path is not accessible by any client. If large number of orphaned records is ever generated an offline process can perform lazy cleanup by performing full "destinations" table scan. DeleteDestination deletes row from "destinations_by_path" table, but keeps row in "destinations" by updating its status to DELETED.
func (*CassandraMetadataService) CreateDestinationUUID ¶
func (s *CassandraMetadataService) CreateDestinationUUID(ctx thrift.Context, uuidRequest *shared.CreateDestinationUUIDRequest) (*shared.DestinationDescription, error)
CreateDestinationUUID creates destination with given destination uuid
func (*CassandraMetadataService) CreateExtent ¶
func (s *CassandraMetadataService) CreateExtent(ctx thrift.Context, request *shared.CreateExtentRequest) (*shared.CreateExtentResult_, error)
CreateExtent implements the corresponding TChanMetadataServiceClient API TODO Have a storage background job to reconcile store view of extents with the metadata
func (*CassandraMetadataService) CreateHostInfo ¶
func (s *CassandraMetadataService) CreateHostInfo(ctx thrift.Context, request *m.CreateHostInfoRequest) error
CreateHostInfo adds a single hardware property for a single hostname
func (*CassandraMetadataService) CreateServiceConfig ¶
func (s *CassandraMetadataService) CreateServiceConfig(ctx thrift.Context, request *m.CreateServiceConfigRequest) error
CreateServiceConfig adds a single config value
func (*CassandraMetadataService) DeleteConsumerGroup ¶
func (s *CassandraMetadataService) DeleteConsumerGroup(ctx thrift.Context, request *shared.DeleteConsumerGroupRequest) (e error)
DeleteConsumerGroup deletes the given consumer group, if its not already deleted Returns success if the group was previously deleted TODO Add TTLs to DELETE commands
func (*CassandraMetadataService) DeleteConsumerGroupUUID ¶ added in v1.26.0
func (s *CassandraMetadataService) DeleteConsumerGroupUUID(ctx thrift.Context, request *m.DeleteConsumerGroupUUIDRequest) error
DeleteConsumerGroupUUID deletes the consumer-group corresponding to the given UUID from the consumer_groups table
func (*CassandraMetadataService) DeleteDestination ¶
func (s *CassandraMetadataService) DeleteDestination(ctx thrift.Context, deleteRequest *shared.DeleteDestinationRequest) error
DeleteDestination implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) DeleteDestinationUUID ¶
func (s *CassandraMetadataService) DeleteDestinationUUID(ctx thrift.Context, deleteRequest *m.DeleteDestinationUUIDRequest) error
DeleteDestinationUUID deletes the destination corresponding to the given UUID from the destinations table
func (*CassandraMetadataService) DeleteHostInfo ¶
func (s *CassandraMetadataService) DeleteHostInfo(ctx thrift.Context, request *m.DeleteHostInfoRequest) error
DeleteHostInfo deletes all hardware properties associated with a single hostname. If a propertyKey is specified, this API will only delete the specific property
func (*CassandraMetadataService) DeleteServiceConfig ¶
func (s *CassandraMetadataService) DeleteServiceConfig(ctx thrift.Context, request *m.DeleteServiceConfigRequest) error
DeleteServiceConfig deletes one or more config values matching the given criteria
func (*CassandraMetadataService) GetSession ¶
func (s *CassandraMetadataService) GetSession() *gocql.Session
GetSession returns the underlying cassandra sesion object This method is only intended for unit test
func (*CassandraMetadataService) HostAddrToUUID ¶
func (s *CassandraMetadataService) HostAddrToUUID(ctx thrift.Context, hostAddr string) (string, error)
HostAddrToUUID returns the UUID corresponding to the hostID, if the mapping exist
func (*CassandraMetadataService) ListAllConsumerGroups ¶
func (s *CassandraMetadataService) ListAllConsumerGroups(ctx thrift.Context, request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error)
ListAllConsumerGroups returns all ConsumerGroups in ConsumerGroups Table. This API is only used for debuging tool
func (*CassandraMetadataService) ListAllDestinations ¶
func (s *CassandraMetadataService) ListAllDestinations(ctx thrift.Context, listRequest *shared.ListDestinationsRequest) (*shared.ListDestinationsResult_, error)
ListAllDestinations implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ListConsumerGroups ¶
func (s *CassandraMetadataService) ListConsumerGroups(ctx thrift.Context, request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error)
ListConsumerGroups returns all ConsumerGroups matching the given [destinationPath or dstUUID, consumerGroupName] tuple If the dstUUID is given, that will be used. Otherwise, the given path will be resolved into a dstUUID. If the ConsumerGroupName parameter is empty, this method will return all ConsumerGroups for the given destination path/uuid. The returned value is an implementation of MetadataServiceListConsumerGroupsOutCall interface. Callers must repeatedly invoke the Read() operation on the returned type until either an EOF or error is returned.
func (*CassandraMetadataService) ListConsumerGroupsUUID ¶ added in v1.27.1
func (s *CassandraMetadataService) ListConsumerGroupsUUID(ctx thrift.Context, request *shared.ListConsumerGroupsUUIDRequest) (*shared.ListConsumerGroupsUUIDResult_, error)
ListConsumerGroupsUUID returns all ConsumerGroups matching the given destination-uuid.
func (*CassandraMetadataService) ListDestinationExtents ¶ added in v0.2.0
func (s *CassandraMetadataService) ListDestinationExtents(ctx thrift.Context, request *m.ListDestinationExtentsRequest) (*m.ListDestinationExtentsResult_, error)
ListDestinationExtents lists all the extents mapped to a given destination
func (*CassandraMetadataService) ListDestinations ¶
func (s *CassandraMetadataService) ListDestinations(ctx thrift.Context, listRequest *shared.ListDestinationsRequest) (*shared.ListDestinationsResult_, error)
ListDestinations implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ListDestinationsByUUID ¶
func (s *CassandraMetadataService) ListDestinationsByUUID(ctx thrift.Context, listRequest *shared.ListDestinationsByUUIDRequest) (*shared.ListDestinationsResult_, error)
ListDestinationsByUUID implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ListEntityOps ¶
func (s *CassandraMetadataService) ListEntityOps(ctx thrift.Context, request *m.ListEntityOpsRequest) (*m.ListEntityOpsResult_, error)
ListEntityOps returns related entity ops auditing information in UserOperation Table. This API is only used for debuging tool
func (*CassandraMetadataService) ListExtentsStats ¶
func (s *CassandraMetadataService) ListExtentsStats(ctx thrift.Context, request *shared.ListExtentsStatsRequest) (*shared.ListExtentsStatsResult_, error)
ListExtentsStats implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ListHosts ¶
func (s *CassandraMetadataService) ListHosts(ctx thrift.Context, listRequest *m.ListHostsRequest) (*m.ListHostsResult_, error)
ListHosts implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ListInputHostExtentsStats ¶
func (s *CassandraMetadataService) ListInputHostExtentsStats(ctx thrift.Context, request *m.ListInputHostExtentsStatsRequest) (*m.ListInputHostExtentsStatsResult_, error)
ListInputHostExtentsStats returns a list of extent stats for the given DstID/InputHostID If the destinationID is not specified, this method will return all extent stats matching the given input host id
func (*CassandraMetadataService) ListStoreExtentsStats ¶
func (s *CassandraMetadataService) ListStoreExtentsStats(ctx thrift.Context, request *m.ListStoreExtentsStatsRequest) (*m.ListStoreExtentsStatsResult_, error)
ListStoreExtentsStats implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) MoveExtent ¶
func (s *CassandraMetadataService) MoveExtent(ctx thrift.Context, request *m.MoveExtentRequest) error
MoveExtent is used to move DLQ extents into the consumer group's normal destination. Any other use IS AT YOUR OWN RISK.
func (*CassandraMetadataService) ReadConsumerGroup ¶
func (s *CassandraMetadataService) ReadConsumerGroup(ctx thrift.Context, request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
ReadConsumerGroup returns the ConsumerGroupDescription for the [destinationPath, groupName]. When destination path is specified as input, this method only returns result, if the destination has not been DELETED. When destination UUID is specified as input, this method will always return result, if the consumer group exist.
func (*CassandraMetadataService) ReadConsumerGroupByUUID ¶
func (s *CassandraMetadataService) ReadConsumerGroupByUUID(ctx thrift.Context, request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
ReadConsumerGroupByUUID returns the ConsumerGroupDescription for the [consumerGroupUUID].
func (*CassandraMetadataService) ReadConsumerGroupExtent ¶
func (s *CassandraMetadataService) ReadConsumerGroupExtent(ctx thrift.Context, request *m.ReadConsumerGroupExtentRequest) (*m.ReadConsumerGroupExtentResult_, error)
ReadConsumerGroupExtent returns the [Status, AckOffset] corresponding to the given [ConsumerGroup, Extent], if it exist
func (*CassandraMetadataService) ReadConsumerGroupExtents ¶
func (s *CassandraMetadataService) ReadConsumerGroupExtents(ctx thrift.Context, request *shared.ReadConsumerGroupExtentsRequest) (*shared.ReadConsumerGroupExtentsResult_, error)
ReadConsumerGroupExtents implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) ReadConsumerGroupExtentsByExtUUID ¶
func (s *CassandraMetadataService) ReadConsumerGroupExtentsByExtUUID(ctx thrift.Context, listRequest *m.ReadConsumerGroupExtentsByExtUUIDRequest) (*m.ReadConsumerGroupExtentsByExtUUIDResult_, error)
ReadConsumerGroupExtentsByExtUUID returns the extents corresponding to the given [extentUUID], if it exist
func (*CassandraMetadataService) ReadConsumerGroupExtentsLite ¶ added in v0.2.0
func (s *CassandraMetadataService) ReadConsumerGroupExtentsLite(ctx thrift.Context, request *m.ReadConsumerGroupExtentsLiteRequest) (*m.ReadConsumerGroupExtentsLiteResult_, error)
ReadConsumerGroupExtentsLite returns the list all extents mapped to the given consumer group. This API only returns a few interesting columns for each extent in the result. For detailed info about extents, see ReadConsumerGroupExtents
func (*CassandraMetadataService) ReadDestination ¶
func (s *CassandraMetadataService) ReadDestination(ctx thrift.Context, getRequest *shared.ReadDestinationRequest) (result *shared.DestinationDescription, err error)
ReadDestination implements the corresponding TChanMetadataServiceClient API Either path or destinationUUID can be specified. Deleted destinations are returned with DELETED status only when destinationUUID is used.
func (*CassandraMetadataService) ReadExtentStats ¶
func (s *CassandraMetadataService) ReadExtentStats(ctx thrift.Context, request *m.ReadExtentStatsRequest) (*m.ReadExtentStatsResult_, error)
ReadExtentStats implements the corresponding TChanMetadataServiceClient API If DestinationUUID is empty, this API uses a SQL query with 'ALLOW FILTERING' which is not scalable for production.
func (*CassandraMetadataService) ReadHostInfo ¶
func (s *CassandraMetadataService) ReadHostInfo(ctx thrift.Context, request *m.ReadHostInfoRequest) (*m.ReadHostInfoResult_, error)
ReadHostInfo returns list of hardware properties for a single hostname
func (*CassandraMetadataService) ReadServiceConfig ¶
func (s *CassandraMetadataService) ReadServiceConfig(ctx thrift.Context, request *m.ReadServiceConfigRequest) (*m.ReadServiceConfigResult_, error)
ReadServiceConfig returns all config that matches the given set of input criteria. The returned result is a list of config key,values
func (*CassandraMetadataService) ReadStoreExtentReplicaStats ¶
func (s *CassandraMetadataService) ReadStoreExtentReplicaStats(ctx thrift.Context, request *m.ReadStoreExtentReplicaStatsRequest) (*m.ReadStoreExtentReplicaStatsResult_, error)
ReadStoreExtentReplicaStats implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) RegisterHostUUID ¶
func (s *CassandraMetadataService) RegisterHostUUID(ctx thrift.Context, request *m.RegisterHostUUIDRequest) error
RegisterHostUUID records a UUID to Host mapping within Cassandra TODO These UUID to Addr mapping doesn't belong in Cassandra, they are stop gap solution until we have Ringpop giving us the UUID along with the ip:port. Get rid these methods after the Ringpop patch is in
func (*CassandraMetadataService) SealExtent ¶
func (s *CassandraMetadataService) SealExtent(ctx thrift.Context, request *m.SealExtentRequest) error
SealExtent implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) SetAckOffset ¶
func (s *CassandraMetadataService) SetAckOffset(ctx thrift.Context, request *shared.SetAckOffsetRequest) error
SetAckOffset updates the ack offset for the given [ConsumerGroup, Exent] If there is no existing record for a [ConsumerGroup, Extent], this method will automatically create a record with the given offset
func (*CassandraMetadataService) SetOutputHost ¶
func (s *CassandraMetadataService) SetOutputHost(ctx thrift.Context, request *m.SetOutputHostRequest) error
SetOutputHost updates the OutputHost for the given [ConsumerGroup, Extent] If there is no existing record for a [ConsumerGroup, Extent], this method will automatically create a record with the given outputHost
func (*CassandraMetadataService) UUIDToHostAddr ¶
func (s *CassandraMetadataService) UUIDToHostAddr(ctx thrift.Context, hostUUID string) (string, error)
UUIDToHostAddr returns the UUID corresponding to the hostID, if the mapping exist
func (*CassandraMetadataService) UpdateConsumerGroup ¶
func (s *CassandraMetadataService) UpdateConsumerGroup(ctx thrift.Context, request *shared.UpdateConsumerGroupRequest) (*shared.ConsumerGroupDescription, error)
UpdateConsumerGroup updates the consumer group information for the given group This method can only be called for an existing consumer group
func (*CassandraMetadataService) UpdateConsumerGroupExtentStatus ¶
func (s *CassandraMetadataService) UpdateConsumerGroupExtentStatus(ctx thrift.Context, request *shared.UpdateConsumerGroupExtentStatusRequest) error
UpdateConsumerGroupExtentStatus updates the consumer group extent status
func (*CassandraMetadataService) UpdateDestination ¶
func (s *CassandraMetadataService) UpdateDestination(ctx thrift.Context, updateRequest *shared.UpdateDestinationRequest) (*shared.DestinationDescription, error)
UpdateDestination implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) UpdateDestinationDLQCursors ¶
func (s *CassandraMetadataService) UpdateDestinationDLQCursors(ctx thrift.Context, updateRequest *m.UpdateDestinationDLQCursorsRequest) (existing *shared.DestinationDescription, err error)
UpdateDestinationDLQCursors implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) UpdateExtentReplicaStats ¶
func (s *CassandraMetadataService) UpdateExtentReplicaStats(ctx thrift.Context, request *m.UpdateExtentReplicaStatsRequest) error
UpdateExtentReplicaStats implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) UpdateExtentStats ¶
func (s *CassandraMetadataService) UpdateExtentStats(ctx thrift.Context, request *m.UpdateExtentStatsRequest) (*m.UpdateExtentStatsResult_, error)
UpdateExtentStats implements the corresponding TChanMetadataServiceClient API
func (*CassandraMetadataService) UpdateHostInfo ¶
func (s *CassandraMetadataService) UpdateHostInfo(ctx thrift.Context, request *m.UpdateHostInfoRequest) error
UpdateHostInfo updates a single hardware property for a single hostname
func (*CassandraMetadataService) UpdateServiceConfig ¶
func (s *CassandraMetadataService) UpdateServiceConfig(ctx thrift.Context, request *m.UpdateServiceConfigRequest) error
UpdateServiceConfig updates a single config value
func (*CassandraMetadataService) UpdateStoreExtentReplicaStats ¶
func (s *CassandraMetadataService) UpdateStoreExtentReplicaStats(ctx thrift.Context, request *m.UpdateStoreExtentReplicaStatsRequest) error
UpdateStoreExtentReplicaStats implements the corresponding TChanMetadataServiceClient API
type Client ¶
type Client interface { UUIDToHostAddr(uuid string) (string, error) HostAddrToUUID(hostAddr string) (string, error) ReadExtentStats(request *m.ReadExtentStatsRequest) (*m.ReadExtentStatsResult_, error) ListExtentsStats(request *shared.ListExtentsStatsRequest) (*shared.ListExtentsStatsResult_, error) ListStoreExtentsStats(request *m.ListStoreExtentsStatsRequest) (*m.ListStoreExtentsStatsResult_, error) ReadDestination(request *shared.ReadDestinationRequest) (*shared.DestinationDescription, error) ListDestinations(request *shared.ListDestinationsRequest) (*shared.ListDestinationsResult_, error) ListDestinationsByUUID(request *shared.ListDestinationsByUUIDRequest) (*shared.ListDestinationsResult_, error) ReadConsumerGroupExtents(request *shared.ReadConsumerGroupExtentsRequest) (*shared.ReadConsumerGroupExtentsResult_, error) ReadConsumerGroupExtent(request *m.ReadConsumerGroupExtentRequest) (*m.ReadConsumerGroupExtentResult_, error) ReadConsumerGroupExtentsByExtUUID(request *m.ReadConsumerGroupExtentsByExtUUIDRequest) (*m.ReadConsumerGroupExtentsByExtUUIDResult_, error) ReadConsumerGroupByUUID(request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error) ReadConsumerGroup(request *shared.ReadConsumerGroupRequest) (*shared.ConsumerGroupDescription, error) ListHosts(request *m.ListHostsRequest) (*m.ListHostsResult_, error) ListConsumerGroups(request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error) ListAllConsumerGroups(request *shared.ListConsumerGroupRequest) (*shared.ListConsumerGroupResult_, error) ReadServiceConfig(request *m.ReadServiceConfigRequest) (*m.ReadServiceConfigResult_, error) UpdateServiceConfig(request *m.UpdateServiceConfigRequest) error DeleteServiceConfig(request *m.DeleteServiceConfigRequest) error ListEntityOps(request *m.ListEntityOpsRequest) (*m.ListEntityOpsResult_, error) }
Client exposes API for metadata access
func NewClient ¶
func NewClient(serviceName string, host string, port int, options *ccli.ClientOptions) (Client, error)
NewClient returns the singleton metadata client used for communicating with the service at given port
func NewHyperbahnClient ¶
func NewHyperbahnClient(serviceName string, bootstrapFile string, options *ccli.ClientOptions) (Client, error)
NewHyperbahnClient returns the singleton metadata client used for communicating with the service via hyperbahn.
type TestCluster ¶
type TestCluster struct {
// contains filtered or unexported fields
}
TestCluster contains a testing Cassandra cluster and metadata client
func (*TestCluster) GetClient ¶
func (s *TestCluster) GetClient() m.TChanMetadataService
GetClient returns the metadata client interface
func (*TestCluster) SetupTestCluster ¶
func (s *TestCluster) SetupTestCluster()
SetupTestCluster initializes the test cluster
func (*TestCluster) TearDownTestCluster ¶
func (s *TestCluster) TearDownTestCluster()
TearDownTestCluster cleans up the test cluster