Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
12 changes: 9 additions & 3 deletions feathr_project/feathr/spark_provider/_localspark_submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,20 @@ def wait_for_completion(self, timeout_seconds: Optional[float] = 500) -> bool:
if proc.returncode == None:
logger.warning(
f"Spark job with pid {self.latest_spark_proc.pid} not completed after {timeout_seconds} sec \
time out setting. Please check."
time out setting. Spark Logs:"
)
with open(log_read.name) as f:
contents = f.read()
logger.error(contents)
if self.clean_up:
self._clean_up()
proc.wait()
return True
elif proc.returncode == 1:
logger.warning(f"Spark job with pid {self.latest_spark_proc.pid} is not successful. Please check.")
logger.warning(f"Spark job with pid {self.latest_spark_proc.pid} is not successful. Spark Logs:")
with open(log_read.name) as f:
contents = f.read()
logger.error(contents)
return False
else:
logger.info(
Expand Down Expand Up @@ -247,7 +253,7 @@ def _get_debug_file_name(self, debug_folder: str = "debug", prefix: str = None):
prefix += datetime.now().strftime("%Y%m%d%H%M%S")
debug_path = os.path.join(debug_folder, prefix)

print(debug_path)
logger.info(f"Spark log path is {debug_path}")
if not os.path.exists(debug_path):
os.makedirs(debug_path)

Expand Down