Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep same amount of partitions after repartitioning in IngestionJob #1279

Merged
merged 4 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions sdk/python/feast/pyspark/launchers/standalone/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ def check_if_started(self):
if not app:
return False

stages = requests.get(
f"http://localhost:{self._ui_port}/api/v1/applications/{app['id']}/stages"
).json()
return bool(stages)
return True

def get_start_time(self) -> datetime:
return self._start_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ class RedisSinkRelation(override val sqlContext: SQLContext, config: SparkRedisC
override def insert(data: DataFrame, overwrite: Boolean): Unit = {
// repartition for deduplication
val dataToStore =
if (config.repartitionByEntity)
data.repartition(config.entityColumns.map(col): _*).localCheckpoint()
if (config.repartitionByEntity && data.rdd.getNumPartitions > 1)
data
.repartition(data.rdd.getNumPartitions, config.entityColumns.map(col): _*)
.localCheckpoint()
else data

dataToStore.foreachPartition { partition: Iterator[Row] =>
Expand Down