Documentation
¶
Index ¶
- Constants
- func GetEntityRowsFromInputFile(inputFilePath string) (<-chan types.EntityRow, []string, error)
- type GroupBuffer
- type OomStore
- func (s *OomStore) Apply(ctx context.Context, opt apply.ApplyOpt) error
- func (s *OomStore) ChannelExport(ctx context.Context, opt types.ChannelExportOpt) (*types.ExportResult, error)
- func (s *OomStore) ChannelJoin(ctx context.Context, opt types.ChannelJoinOpt) (*types.JoinResult, error)
- func (s *OomStore) Close() error
- func (s *OomStore) CreateEntity(ctx context.Context, opt types.CreateEntityOpt) (int, error)
- func (s *OomStore) CreateFeature(ctx context.Context, opt types.CreateFeatureOpt) (int, error)
- func (s *OomStore) CreateGroup(ctx context.Context, opt types.CreateGroupOpt) (int, error)
- func (s *OomStore) Export(ctx context.Context, opt types.ExportOpt) error
- func (s *OomStore) GetEntity(ctx context.Context, id int) (*types.Entity, error)
- func (s *OomStore) GetEntityByName(ctx context.Context, name string) (*types.Entity, error)
- func (s *OomStore) GetFeature(ctx context.Context, id int) (*types.Feature, error)
- func (s *OomStore) GetFeatureByName(ctx context.Context, fullName string) (*types.Feature, error)
- func (s *OomStore) GetGroup(ctx context.Context, id int) (*types.Group, error)
- func (s *OomStore) GetGroupByName(ctx context.Context, name string) (*types.Group, error)
- func (s *OomStore) GetRevision(ctx context.Context, id int) (*types.Revision, error)
- func (s *OomStore) GetRevisionBy(ctx context.Context, groupID int, revision int64) (*types.Revision, error)
- func (s *OomStore) Import(ctx context.Context, opt types.ImportOpt) (int, error)
- func (s *OomStore) InitStreamPushProcessor(ctx context.Context)
- func (s *OomStore) Join(ctx context.Context, opt types.JoinOpt) error
- func (s *OomStore) ListEntity(ctx context.Context) (types.EntityList, error)
- func (s *OomStore) ListFeature(ctx context.Context, opt types.ListFeatureOpt) (types.FeatureList, error)
- func (s *OomStore) ListGroup(ctx context.Context, entityID *int) (types.GroupList, error)
- func (s *OomStore) ListRevision(ctx context.Context, groupID *int) (types.RevisionList, error)
- func (s *OomStore) OnlineGet(ctx context.Context, opt types.OnlineGetOpt) (*types.FeatureValues, error)
- func (s *OomStore) OnlineMultiGet(ctx context.Context, opt types.OnlineMultiGetOpt) (map[string]*types.FeatureValues, error)
- func (s *OomStore) Ping(ctx context.Context) error
- func (s *OomStore) Push(ctx context.Context, opt types.PushOpt) error
- func (s *OomStore) Snapshot(ctx context.Context, groupName string) error
- func (s *OomStore) Sync(ctx context.Context, opt types.SyncOpt) error
- func (s *OomStore) UpdateEntity(ctx context.Context, opt types.UpdateEntityOpt) error
- func (s *OomStore) UpdateFeature(ctx context.Context, opt types.UpdateFeatureOpt) error
- func (s *OomStore) UpdateGroup(ctx context.Context, opt types.UpdateGroupOpt) error
- type StreamPushProcessor
Constants ¶
const ( Day = 24 * time.Hour Capacity = 1000 Period = 5 * time.Minute MinPeriod = 2 * time.Minute )
const (
FeatureFullNameSeparator = "."
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GroupBuffer ¶ added in v0.0.4
type GroupBuffer struct {
// contains filtered or unexported fields
}
type OomStore ¶
type OomStore struct {
// contains filtered or unexported fields
}
Combine online store, offline store, and metadata store instances in one place.
func Open ¶
Return an OomStore instance given the configuration. Under the hood, it setups connections to the underlying databases. You should always use this method to create a new OomStore instance in code.
func TEST__New ¶ added in v0.0.3
Return an OomStore instance for internal test purpose ONLY. You should NOT use this method directly in any of your code.
func (*OomStore) ChannelExport ¶ added in v0.0.4
func (s *OomStore) ChannelExport(ctx context.Context, opt types.ChannelExportOpt) (*types.ExportResult, error)
Export feature values of a particular revision. Usage Example:
exportResult, err := store.Export(ctx, opt)
if err != nil {
return err
}
for row := range exportResult.Data {
fmt.Println(cast.ToStringSlice([]interface{}(row)))
}
// Attention: call CheckStreamError after consuming exportResult.Data channel
return exportResult.CheckStreamError()
func (*OomStore) ChannelJoin ¶ added in v0.0.4
func (s *OomStore) ChannelJoin(ctx context.Context, opt types.ChannelJoinOpt) (*types.JoinResult, error)
ChannelJoin gets point-in-time correct feature values for each entity row. Currently, this API only supports batch features.
func (*OomStore) CreateEntity ¶
Create metadata for an entity.
func (*OomStore) CreateFeature ¶ added in v0.0.4
Create metadata of a feature.
func (*OomStore) CreateGroup ¶ added in v0.0.3
Create metadata of a feature group.
func (*OomStore) GetEntityByName ¶ added in v0.0.2
Get metadata of an entity by name.
func (*OomStore) GetFeature ¶
Get metadata of a feature by ID.
func (*OomStore) GetFeatureByName ¶ added in v0.0.2
Get metadata of a feature by full name.
func (*OomStore) GetGroupByName ¶ added in v0.0.3
Get metadata of a feature group by name.
func (*OomStore) GetRevision ¶
Get metadata of a revision by ID.
func (*OomStore) GetRevisionBy ¶ added in v0.0.2
func (s *OomStore) GetRevisionBy(ctx context.Context, groupID int, revision int64) (*types.Revision, error)
Get metadata of a revision by group ID and revision.
func (*OomStore) Import ¶ added in v0.0.3
Import data into the offline feature store as a new revision. In the future we want to support more diverse data sources.
func (*OomStore) InitStreamPushProcessor ¶ added in v0.0.4
func (*OomStore) Join ¶ added in v0.0.3
Join gets point-in-time correct feature values for each entity row. The method is similar to Join, except that both input and output are files on disk. Input File should contain header, the first two columns of Input File should be entity_key, unix_milli, then followed by other real-time feature values.
func (*OomStore) ListEntity ¶
List metadata of all entities.
func (*OomStore) ListFeature ¶
func (s *OomStore) ListFeature(ctx context.Context, opt types.ListFeatureOpt) (types.FeatureList, error)
List metadata of features meeting particular criteria.
func (*OomStore) ListRevision ¶
List metadata of revisions of a same group.
func (*OomStore) OnlineGet ¶ added in v0.0.3
func (s *OomStore) OnlineGet(ctx context.Context, opt types.OnlineGetOpt) (*types.FeatureValues, error)
OnlineGet gets online features of a particular entity instance.
func (*OomStore) OnlineMultiGet ¶ added in v0.0.3
func (s *OomStore) OnlineMultiGet(ctx context.Context, opt types.OnlineMultiGetOpt) (map[string]*types.FeatureValues, error)
OnlineMultiGet gets online features of multiple entity instances.
func (*OomStore) Ping ¶ added in v0.0.4
Ping verifies the connections to the backend stores are still alive
func (*OomStore) Push ¶ added in v0.0.4
Push inserts stream feature values to online store and offline store
func (*OomStore) Sync ¶ added in v0.0.2
Sync a particular revision of a feature group from offline to online store. It is a streaming process - it writes to online store while reading from offline store. This helps get rid of unwanted out-of-memory errors, where size of the particular revision outgrows memory limit of your machine.
func (*OomStore) UpdateEntity ¶
Update metadata for an entity.
func (*OomStore) UpdateFeature ¶
Update metadata of a feature.
func (*OomStore) UpdateGroup ¶ added in v0.0.3
Update metadata of a feature group.
type StreamPushProcessor ¶ added in v0.0.4
type StreamPushProcessor struct {
// contains filtered or unexported fields
}
func (*StreamPushProcessor) Close ¶ added in v0.0.4
func (p *StreamPushProcessor) Close() error
func (*StreamPushProcessor) Push ¶ added in v0.0.4
func (p *StreamPushProcessor) Push(record types.StreamRecord)