public class StreamFeatureGroup extends FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Modifier and Type | Field and Description |
---|---|
protected FeatureGroupEngine |
featureGroupEngine |
created, creator, deltaStreamerJobConf, deprecated, description, eventTime, expectationsNames, featureGroupEngineBase, features, featureStore, hudiPrecombineKey, id, location, LOGGER, name, notificationTopicName, onlineConfig, onlineEnabled, onlineIngestionApi, onlineTopicName, partitionKeys, path, primaryKeys, statisticColumns, statisticsConfig, storageConnector, subject, timeTravelFormat, topicName, type, utils, version
Constructor and Description |
---|
StreamFeatureGroup() |
StreamFeatureGroup(FeatureStore featureStore,
int id) |
StreamFeatureGroup(FeatureStore featureStore,
@NonNull String name,
Integer version,
String description,
List<String> primaryKeys,
List<String> partitionKeys,
String hudiPrecombineKey,
boolean onlineEnabled,
TimeTravelFormat timeTravelFormat,
List<Feature> features,
StatisticsConfig statisticsConfig,
String onlineTopicName,
String eventTime,
OnlineConfig onlineConfig,
StorageConnector storageConnector,
String path) |
StreamFeatureGroup(Integer id,
String description,
List<Feature> features) |
Modifier and Type | Method and Description |
---|---|
void |
appendFeatures(Feature feature)
Append a single feature to the schema of the feature group.
|
void |
appendFeatures(List<Feature> feature)
Append features to the schema of the feature group.
|
QueryBase |
asOf(String wallclockTime) |
QueryBase |
asOf(String wallclockTime,
String excludeUntil) |
void |
commitDeleteRecord(org.apache.beam.sdk.values.PCollection<Object> featureData) |
void |
commitDeleteRecord(org.apache.beam.sdk.values.PCollection<Object> featureData,
Map<String,String> writeOptions) |
Map<Long,Map<String,String>> |
commitDetails() |
Map<Long,Map<String,String>> |
commitDetails(Integer integer) |
Map<Long,Map<String,String>> |
commitDetails(String limit) |
Map<Long,Map<String,String>> |
commitDetails(String wallclockTime,
Integer limit) |
Statistics |
computeStatistics()
Recompute the statistics for the feature group and save them to the feature store.
|
Statistics |
computeStatistics(String wallclockTime) |
Statistics |
getStatistics()
Get the last statistics commit for the feature group.
|
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
boolean overwrite) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
boolean online,
Map<String,String> writeOptions) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
boolean online,
Map<String,String> writeOptions,
JobConfiguration jobConfiguration) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
HudiOperationType hudiOperationType) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
JobConfiguration jobConfiguration) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
Map<String,String> writeOptions) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
Storage storage) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
Storage storage,
boolean overwrite) |
void |
insert(org.apache.beam.sdk.values.PCollection<Object> featureData,
Storage storage,
boolean online,
HudiOperationType hudiOperationType,
Map<String,String> writeOptions) |
BeamProducer |
insertStream()
Ingest a feature data to the online feature store using Beam Pipeline object.
|
BeamProducer |
insertStream(Map<String,String> writeOptions) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
Map<String,String> writeOptions) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
Map<String,String> writeOptions) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
boolean awaitTermination,
Long timeout) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
boolean awaitTermination,
Long timeout,
String checkpointLocation) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
boolean awaitTermination,
Long timeout,
String checkpointLocation,
Map<String,String> writeOptions) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
boolean awaitTermination,
Long timeout,
String checkpointLocation,
Map<String,String> writeOptions,
JobConfiguration jobConfiguration) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
boolean awaitTermination,
String checkpointLocation) |
Object |
insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData,
String queryName,
String outputMode,
String checkpointLocation) |
org.apache.beam.sdk.values.PCollection<Object> |
read() |
org.apache.beam.sdk.values.PCollection<Object> |
read(boolean online) |
org.apache.beam.sdk.values.PCollection<Object> |
read(boolean online,
Map<String,String> readOptions) |
org.apache.beam.sdk.values.PCollection<Object> |
read(Map<String,String> readOptions) |
org.apache.beam.sdk.values.PCollection<Object> |
read(String wallclockTime) |
org.apache.beam.sdk.values.PCollection<Object> |
read(String wallclockTime,
Map<String,String> readOptions) |
QueryBase |
select(List<String> features) |
QueryBase |
selectAll() |
QueryBase |
selectExcept(List<String> features) |
QueryBase |
selectExceptFeatures(List<Feature> features) |
QueryBase |
selectFeatures(List<Feature> features) |
void |
show(int numRows) |
void |
show(int numRows,
boolean online) |
void |
updateFeatures(Feature feature)
Update the metadata of multiple features.
|
void |
updateFeatures(List<Feature> feature)
Update the metadata of multiple features.
|
addTag, checkDeprecated, delete, deleteTag, getAvroSchema, getComplexFeatures, getDeserializedAvroSchema, getDeserializedEncodedAvroSchema, getEncodedAvroSchema, getFeature, getFeatureAvroSchema, getLatestOnlineIngestion, getOnlineIngestion, getPrimaryKeys, getSubject, getTag, getTags, setDeprecated, unloadSubject, updateDeprecated, updateDeprecated, updateDescription, updateFeatureDescription, updateNotificationTopicName, updateStatisticsConfig
protected FeatureGroupEngine featureGroupEngine
public StreamFeatureGroup(FeatureStore featureStore, @NonNull @NonNull String name, Integer version, String description, List<String> primaryKeys, List<String> partitionKeys, String hudiPrecombineKey, boolean onlineEnabled, TimeTravelFormat timeTravelFormat, List<Feature> features, StatisticsConfig statisticsConfig, String onlineTopicName, String eventTime, OnlineConfig onlineConfig, StorageConnector storageConnector, String path)
public StreamFeatureGroup()
public StreamFeatureGroup(Integer id, String description, List<Feature> features)
public StreamFeatureGroup(FeatureStore featureStore, int id)
public org.apache.beam.sdk.values.PCollection<Object> read() throws FeatureStoreException, IOException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public org.apache.beam.sdk.values.PCollection<Object> read(boolean online) throws FeatureStoreException, IOException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public org.apache.beam.sdk.values.PCollection<Object> read(Map<String,String> readOptions) throws FeatureStoreException, IOException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public org.apache.beam.sdk.values.PCollection<Object> read(boolean online, Map<String,String> readOptions) throws FeatureStoreException, IOException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public org.apache.beam.sdk.values.PCollection<Object> read(String wallclockTime) throws FeatureStoreException, IOException, ParseException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public org.apache.beam.sdk.values.PCollection<Object> read(String wallclockTime, Map<String,String> readOptions) throws FeatureStoreException, IOException, ParseException
read
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public QueryBase asOf(String wallclockTime) throws FeatureStoreException, ParseException
asOf
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
ParseException
public QueryBase asOf(String wallclockTime, String excludeUntil) throws FeatureStoreException, ParseException
asOf
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
ParseException
public void show(int numRows) throws FeatureStoreException, IOException
show
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public void show(int numRows, boolean online) throws FeatureStoreException, IOException
show
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData) throws IOException, FeatureStoreException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, Map<String,String> writeOptions) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, Storage storage) throws IOException, FeatureStoreException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, boolean overwrite) throws IOException, FeatureStoreException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, Storage storage, boolean overwrite) throws IOException, FeatureStoreException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, boolean online, Map<String,String> writeOptions) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, HudiOperationType hudiOperationType) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, Storage storage, boolean online, HudiOperationType hudiOperationType, Map<String,String> writeOptions) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, JobConfiguration jobConfiguration) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void insert(org.apache.beam.sdk.values.PCollection<Object> featureData, boolean online, Map<String,String> writeOptions, JobConfiguration jobConfiguration) throws FeatureStoreException, IOException, ParseException
insert
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void commitDeleteRecord(org.apache.beam.sdk.values.PCollection<Object> featureData) throws FeatureStoreException, IOException, ParseException
commitDeleteRecord
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public void commitDeleteRecord(org.apache.beam.sdk.values.PCollection<Object> featureData, Map<String,String> writeOptions) throws FeatureStoreException, IOException, ParseException
commitDeleteRecord
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public Map<Long,Map<String,String>> commitDetails() throws IOException, FeatureStoreException, ParseException
commitDetails
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public Map<Long,Map<String,String>> commitDetails(Integer integer) throws IOException, FeatureStoreException, ParseException
commitDetails
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public Map<Long,Map<String,String>> commitDetails(String limit) throws IOException, FeatureStoreException, ParseException
commitDetails
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public Map<Long,Map<String,String>> commitDetails(String wallclockTime, Integer limit) throws IOException, FeatureStoreException, ParseException
commitDetails
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
IOException
FeatureStoreException
ParseException
public QueryBase selectFeatures(List<Feature> features)
selectFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
public QueryBase select(List<String> features)
select
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
public QueryBase selectAll()
selectAll
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
public QueryBase selectExceptFeatures(List<Feature> features)
selectExceptFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
public QueryBase selectExcept(List<String> features)
selectExcept
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
public BeamProducer insertStream() throws Exception
// get feature store handle
FeatureStore fs = HopsworksConnection.builder().build().getFeatureStore();
// get feature group handle
StreamFeatureGroup fg = fs.getStreamFeatureGroup("taxi_ride", 1);
// create Beam pipeline
Pipeline pipeline = Pipeline.create();
pipeline
.apply("read stream from the source", PubsubIO.readStrings().fromTopic(options.getInputTopic()))
.apply("Parse JSON to Beam Rows", JsonToRow.withSchema(schema))
.apply("insert streaming feature data", fg.insertStream());
Exception
public BeamProducer insertStream(Map<String,String> writeOptions) throws Exception
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, Map<String,String> writeOptions) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, Map<String,String> writeOptions) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, String checkpointLocation) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, boolean awaitTermination, Long timeout) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, boolean awaitTermination, Long timeout, String checkpointLocation) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, boolean awaitTermination, Long timeout, String checkpointLocation, Map<String,String> writeOptions) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, boolean awaitTermination, String checkpointLocation) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public Object insertStream(org.apache.beam.sdk.values.PCollection<Object> featureData, String queryName, String outputMode, boolean awaitTermination, Long timeout, String checkpointLocation, Map<String,String> writeOptions, JobConfiguration jobConfiguration) throws Exception
insertStream
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
Exception
public void updateFeatures(List<Feature> feature) throws FeatureStoreException, IOException, ParseException
FeatureGroupBase
updateFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
feature
- List of Feature metadata objectsFeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionParseException
- ParseExceptionpublic void updateFeatures(Feature feature) throws FeatureStoreException, IOException, ParseException
FeatureGroupBase
updateFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
feature
- Feature metadata objectFeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionParseException
- ParseExceptionpublic void appendFeatures(List<Feature> feature) throws FeatureStoreException, IOException, ParseException
FeatureGroupBase
appendFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
feature
- list of Feature metadata objectsFeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionParseException
- ParseExceptionpublic void appendFeatures(Feature feature) throws FeatureStoreException, IOException, ParseException
FeatureGroupBase
appendFeatures
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
feature
- List of Feature metadata objectsFeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionParseException
- ParseExceptionpublic Statistics computeStatistics() throws FeatureStoreException, IOException, ParseException
FeatureGroupBase
computeStatistics
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionParseException
public Statistics computeStatistics(String wallclockTime) throws FeatureStoreException, IOException, ParseException
computeStatistics
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
IOException
ParseException
public Statistics getStatistics() throws FeatureStoreException, IOException
FeatureGroupBase
getStatistics
in class FeatureGroupBase<org.apache.beam.sdk.values.PCollection<Object>>
FeatureStoreException
- FeatureStoreExceptionIOException
- IOExceptionCopyright © 2025. All rights reserved.