Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.

Commit aae754b

Browse files
author
Guo Chenzhao
authored
Merge pull request #557 from aaudiber/fix-spark-probe
Fix spark hostname probing when date matches worker port
2 parents b90e5ce + b4d7d13 commit aae754b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

bin/functions/load_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,8 +563,9 @@ def probe_masters_slaves_hostnames():
563563
with closing(urllib.urlopen('http://%s:%s' % (HibenchConf['hibench.masters.hostnames'], master_port), proxies={})) as page:
564564
worker_hostnames = []
565565
for x in page.readlines():
566-
if worker_port in x and "worker" in x:
567-
worker_hostnames.append(re.findall("http:\/\/([a-zA-Z\-\._0-9]+):%s" % worker_port, x)[0])
566+
matches = re.findall("http:\/\/([a-zA-Z\-\._0-9]+):%s" % worker_port, x)
567+
if matches:
568+
worker_hostnames.append(matches[0])
568569
HibenchConf['hibench.slaves.hostnames'] = " ".join(worker_hostnames)
569570
HibenchConfRef['hibench.slaves.hostnames'] = "Probed by parsing " + \
570571
'http://%s:%s' % (HibenchConf['hibench.masters.hostnames'], master_port)

0 commit comments

Comments
 (0)