Package com.logicalclocks.hsfs.engine
Class FeatureGroupUtils
java.lang.Object
com.logicalclocks.hsfs.engine.FeatureGroupUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommitDetails(FeatureGroupBase featureGroup, String wallclockTime, Integer limit) getComplexFeatures(List<Feature> features) getDatasetType(String path) static DategetDateFromDateString(String inputDate) org.apache.avro.SchemagetDeserializedAvroSchema(String avroSchema) org.apache.avro.SchemagetDeserializedEncodedAvroSchema(org.apache.avro.Schema schema, List<String> complexFeatures) getEncodedAvroSchema(org.apache.avro.Schema schema, List<String> complexFeatures) getFeatureAvroSchema(String featureName, org.apache.avro.Schema schema) getFgName(FeatureGroupBase featureGroup) getHeaders(FeatureGroupBase featureGroup, Long numEntries) getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options) getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options, String operation) getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options, String operation, Storage storage) Kafka headers for the records of one write to the online topic.getHiveServerConnection(FeatureGroupBase featureGroup, String connectionString) scala.collection.Seq<String>getPartitionColumns(FeatureGroupBase offlineFeatureGroup) scala.collection.Seq<String>getPrimaryColumns(FeatureGroupBase offlineFeatureGroup) getSubject(FeatureGroupBase featureGroup) getTableName(FeatureGroupBase offlineFeatureGroup) static LonggetTimeStampFromDateString(String inputDate) timeStampToHudiFormat(Long commitedOnTimeStamp) voidverifyAttributeKeyNames(FeatureGroupBase featureGroup, List<String> partitionKeyNames, String precombineKeyName)
-
Constructor Details
-
FeatureGroupUtils
public FeatureGroupUtils()
-
-
Method Details
-
getTableName
-
getPartitionColumns
-
getPrimaryColumns
-
getFgName
-
getHiveServerConnection
public String getHiveServerConnection(FeatureGroupBase featureGroup, String connectionString) throws IOException, FeatureStoreException - Throws:
IOExceptionFeatureStoreException
-
getDateFromDateString
public static Date getDateFromDateString(String inputDate) throws FeatureStoreException, ParseException - Throws:
FeatureStoreExceptionParseException
-
getTimeStampFromDateString
public static Long getTimeStampFromDateString(String inputDate) throws FeatureStoreException, ParseException - Throws:
FeatureStoreExceptionParseException
-
timeStampToHudiFormat
-
getCommitDetails
public Map<Long,Map<String, getCommitDetailsString>> (FeatureGroupBase featureGroup, String wallclockTime, Integer limit) throws FeatureStoreException, IOException, ParseException -
getComplexFeatures
-
getFeatureAvroSchema
public String getFeatureAvroSchema(String featureName, org.apache.avro.Schema schema) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
getDeserializedEncodedAvroSchema
public org.apache.avro.Schema getDeserializedEncodedAvroSchema(org.apache.avro.Schema schema, List<String> complexFeatures) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
getEncodedAvroSchema
public String getEncodedAvroSchema(org.apache.avro.Schema schema, List<String> complexFeatures) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
getDeserializedAvroSchema
public org.apache.avro.Schema getDeserializedAvroSchema(String avroSchema) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
verifyAttributeKeyNames
public void verifyAttributeKeyNames(FeatureGroupBase featureGroup, List<String> partitionKeyNames, String precombineKeyName) throws FeatureStoreException - Throws:
FeatureStoreException
-
getSubject
- Throws:
FeatureStoreExceptionIOException
-
getDatasetType
-
getHeaders
public static Map<String,byte[]> getHeaders(FeatureGroupBase featureGroup, Long numEntries) throws FeatureStoreException, IOException - Throws:
FeatureStoreExceptionIOException
-
getHeaders
public static Map<String,byte[]> getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options) throws FeatureStoreException, IOException- Throws:
FeatureStoreExceptionIOException
-
getHeaders
public static Map<String,byte[]> getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options, String operation) throws FeatureStoreException, IOException- Throws:
FeatureStoreExceptionIOException
-
getHeaders
public static Map<String,byte[]> getHeaders(FeatureGroupBase featureGroup, Long numEntries, Map<String, String> options, String operation, Storage storage) throws FeatureStoreException, IOExceptionKafka headers for the records of one write to the online topic.- Parameters:
featureGroup- FeatureGroupBase Feature Group hsfs metadata objectnumEntries- number of records this write produces, reported by the online ingestionoptions- options map; supported keys under"online_ingestion_options.*"operation-"delete"for an online delete tombstone, null for an upsertstorage- which consumer of the topic is meant to ingest these records:Storage.ONLINEfor OnlineFS alone,Storage.OFFLINEfor the offline materialization job alone, null when both read them- Throws:
FeatureStoreException- If Client is not connected to HopsworksIOException- Generic IO exception.
-