Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename spark to spark.offline and spark.engine
Signed-off-by: niklasvm <niklasvm@gmail.com>
  • Loading branch information
niklasvm committed Sep 7, 2022
commit 84cc858b02188575eb27bf372c87dab1450033eb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class SparkMaterializationEngineConfig(FeastConfigBaseModel):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably makes sense to throw an error somewhere if the offline store is not the SparkOfflineStore?

"""Batch Materialization Engine config for spark engine"""

type: Literal["spark"] = "spark"
type: Literal["spark.engine"] = "spark.engine"
""" Type selector"""

partitions: int = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@


class SparkOfflineStoreConfig(FeastConfigBaseModel):
type: StrictStr = "spark"
type: StrictStr = "spark.offline"
Comment thread
niklasvm marked this conversation as resolved.
Outdated
""" Offline store type selector"""

spark_conf: Optional[Dict[str, str]] = None
Expand All @@ -49,7 +49,7 @@ class SparkOfflineStoreConfig(FeastConfigBaseModel):

class SparkOfflineStore(OfflineStore):
@staticmethod
@log_exceptions_and_usage(offline_store="spark")
@log_exceptions_and_usage(offline_store="spark.offline")
def pull_latest_from_table_or_query(
config: RepoConfig,
data_source: DataSource,
Expand Down Expand Up @@ -247,7 +247,7 @@ def offline_write_batch(
)

@staticmethod
@log_exceptions_and_usage(offline_store="spark")
@log_exceptions_and_usage(offline_store="spark.offline")
def pull_all_from_table_or_query(
config: RepoConfig,
data_source: DataSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_spark_materialization_consistency():
# "path": "data/online_store.db"
},
offline_store_creator=SparkDataSourceCreator,
batch_engine={"type": "spark", "partitions": 100},
batch_engine={"type": "spark.engine", "partitions": 100},
)
spark_environment = construct_test_environment(
spark_config, None, entity_key_serialization_version=1
Expand Down