Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
efeb1429
Commit
efeb1429
authored
11 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Plain Diff
Merge pull request #849 from mateiz/web-fixes
Small fixes to web UI
parents
abdc1f8b
793a722f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/src/main/scala/spark/ui/SparkUI.scala
+5
-5
5 additions, 5 deletions
core/src/main/scala/spark/ui/SparkUI.scala
core/src/test/scala/spark/ui/UISuite.scala
+4
-3
4 additions, 3 deletions
core/src/test/scala/spark/ui/UISuite.scala
ec2/spark_ec2.py
+1
-1
1 addition, 1 deletion
ec2/spark_ec2.py
with
10 additions
and
9 deletions
core/src/main/scala/spark/ui/SparkUI.scala
+
5
−
5
View file @
efeb1429
...
@@ -30,7 +30,7 @@ import spark.ui.JettyUtils._
...
@@ -30,7 +30,7 @@ import spark.ui.JettyUtils._
/** Top level user interface for Spark */
/** Top level user interface for Spark */
private
[
spark
]
class
SparkUI
(
sc
:
SparkContext
)
extends
Logging
{
private
[
spark
]
class
SparkUI
(
sc
:
SparkContext
)
extends
Logging
{
val
host
=
Utils
.
localHostName
()
val
host
=
Option
(
System
.
getenv
(
"SPARK_PUBLIC_DNS"
)).
getOrElse
(
Utils
.
localHostName
()
)
val
port
=
Option
(
System
.
getProperty
(
"spark.ui.port"
)).
getOrElse
(
SparkUI
.
DEFAULT_PORT
).
toInt
val
port
=
Option
(
System
.
getProperty
(
"spark.ui.port"
)).
getOrElse
(
SparkUI
.
DEFAULT_PORT
).
toInt
var
boundPort
:
Option
[
Int
]
=
None
var
boundPort
:
Option
[
Int
]
=
None
var
server
:
Option
[
Server
]
=
None
var
server
:
Option
[
Server
]
=
None
...
@@ -58,9 +58,9 @@ private[spark] class SparkUI(sc: SparkContext) extends Logging {
...
@@ -58,9 +58,9 @@ private[spark] class SparkUI(sc: SparkContext) extends Logging {
server
=
Some
(
srv
)
server
=
Some
(
srv
)
boundPort
=
Some
(
usedPort
)
boundPort
=
Some
(
usedPort
)
}
catch
{
}
catch
{
case
e
:
Exception
=>
case
e
:
Exception
=>
logError
(
"Failed to create Spark JettyUtils"
,
e
)
logError
(
"Failed to create Spark JettyUtils"
,
e
)
System
.
exit
(
1
)
System
.
exit
(
1
)
}
}
}
}
...
@@ -82,6 +82,6 @@ private[spark] class SparkUI(sc: SparkContext) extends Logging {
...
@@ -82,6 +82,6 @@ private[spark] class SparkUI(sc: SparkContext) extends Logging {
}
}
private
[
spark
]
object
SparkUI
{
private
[
spark
]
object
SparkUI
{
val
DEFAULT_PORT
=
"3
30
00"
val
DEFAULT_PORT
=
"30
3
0"
val
STATIC_RESOURCE_DIR
=
"spark/ui/static"
val
STATIC_RESOURCE_DIR
=
"spark/ui/static"
}
}
This diff is collapsed.
Click to expand it.
core/src/test/scala/spark/ui/UISuite.scala
+
4
−
3
View file @
efeb1429
...
@@ -24,14 +24,15 @@ import org.eclipse.jetty.server.Server
...
@@ -24,14 +24,15 @@ import org.eclipse.jetty.server.Server
class
UISuite
extends
FunSuite
{
class
UISuite
extends
FunSuite
{
test
(
"jetty port increases under contention"
)
{
test
(
"jetty port increases under contention"
)
{
val
startPort
=
3
3333
val
startPort
=
3
030
val
server
=
new
Server
(
startPort
)
val
server
=
new
Server
(
startPort
)
server
.
start
()
server
.
start
()
val
(
jettyServer1
,
boundPort1
)
=
JettyUtils
.
startJettyServer
(
"localhost"
,
startPort
,
Seq
())
val
(
jettyServer1
,
boundPort1
)
=
JettyUtils
.
startJettyServer
(
"localhost"
,
startPort
,
Seq
())
val
(
jettyServer2
,
boundPort2
)
=
JettyUtils
.
startJettyServer
(
"localhost"
,
startPort
,
Seq
())
val
(
jettyServer2
,
boundPort2
)
=
JettyUtils
.
startJettyServer
(
"localhost"
,
startPort
,
Seq
())
assert
(
boundPort1
===
startPort
+
1
)
// Allow some wiggle room in case ports on the machine are under contention
assert
(
boundPort2
===
startPort
+
2
)
assert
(
boundPort1
>
startPort
&&
boundPort1
<
startPort
+
10
)
assert
(
boundPort2
>
boundPort1
&&
boundPort2
<
boundPort1
+
10
)
}
}
test
(
"jetty binds to port 0 correctly"
)
{
test
(
"jetty binds to port 0 correctly"
)
{
...
...
This diff is collapsed.
Click to expand it.
ec2/spark_ec2.py
+
1
−
1
View file @
efeb1429
...
@@ -178,7 +178,7 @@ def launch_cluster(conn, opts, cluster_name):
...
@@ -178,7 +178,7 @@ def launch_cluster(conn, opts, cluster_name):
master_group
.
authorize
(
'
tcp
'
,
50030
,
50030
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
50030
,
50030
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
50070
,
50070
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
50070
,
50070
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
60070
,
60070
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
60070
,
60070
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
3
30
00
,
3
30
10
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
30
3
0
,
30
35
,
'
0.0.0.0/0
'
)
if
opts
.
cluster_type
==
"
mesos
"
:
if
opts
.
cluster_type
==
"
mesos
"
:
master_group
.
authorize
(
'
tcp
'
,
38090
,
38090
,
'
0.0.0.0/0
'
)
master_group
.
authorize
(
'
tcp
'
,
38090
,
38090
,
'
0.0.0.0/0
'
)
if
opts
.
ganglia
:
if
opts
.
ganglia
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment