Skip to content

Commit e0be959

Browse files
authored
Change status to ingesting only after enough resources have been allocated
1 parent 3a4ff80 commit e0be959

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/workloads/spark_job/spark_job.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def ingest_raw_dataset(spark, ctx, cols_to_validate, should_ingest):
141141

142142
col_resources_to_validate = [ctx.rf_id_map[f] for f in cols_to_validate]
143143
ctx.upload_resource_status_start(*col_resources_to_validate)
144+
144145
try:
145146
if should_ingest:
146147
data_config = ctx.environment["data"]
@@ -302,6 +303,7 @@ def run_job(args):
302303
try:
303304
spark = None # For the finally clause
304305
spark = get_spark_session(ctx.workload_id)
306+
spark.sparkContext.parallelize([1, 2, 3, 4, 5]).count() # test that executors are allocated
305307
raw_df = ingest_raw_dataset(spark, ctx, cols_to_validate, should_ingest)
306308

307309
if len(cols_to_aggregate) > 0:

0 commit comments

Comments
 (0)