8000 [luigi.contrib.spark] tracking_url_pattern as a property by drowoseque · Pull Request #2820 · spotify/luigi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[luigi.contrib.spark] tracking_url_pattern as a property #2820

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

Merged
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
10 changes: 5 additions & 5 deletions luigi/contrib/spark.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import importlib
import tarfile
import inspect

try:
import cPickle as pickle
except ImportError:
Expand Down Expand Up @@ -57,14 +58,13 @@ class SparkSubmitTask(ExternalProgramTask):
# Spark applications write its logs into stderr
stream_for_searching_tracking_url = 'stderr'

def run(self):
@property
def tracking_url_pattern(self):
if self.deploy_mode == "cluster":
# in cluster mode client only receives application status once a period of time
self.tracking_url_pattern = r"tracking URL: (https?://.*)\s"
return r"tracking URL: (https?://.*)\s"
else:
self.tracking_url_pattern = r"Bound (?:.*) to (?:.*), and started at (https?://.*)\s"

super(SparkSubmitTask, self).run()
return r"Bound (?:.*) to (?:.*), and started at (https?://.*)\s"

def app_options(self):
"""
Expand Down
0