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
b1019941
Commit
b1019941
authored
11 years ago
by
Patrick Wendell
Browse files
Options
Downloads
Patches
Plain Diff
Slight refactoring to SparkContext functions
parent
cfcd77b5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/SparkContext.scala
+8
-5
8 additions, 5 deletions
core/src/main/scala/spark/SparkContext.scala
core/src/main/scala/spark/ui/jobs/PoolTable.scala
+2
-2
2 additions, 2 deletions
core/src/main/scala/spark/ui/jobs/PoolTable.scala
with
10 additions
and
7 deletions
core/src/main/scala/spark/SparkContext.scala
+
8
−
5
View file @
b1019941
...
...
@@ -581,10 +581,17 @@ class SparkContext(
* Return pools for fair scheduler
* TODO(xiajunluan): We should take nested pools into account
*/
def
getPools
:
ArrayBuffer
[
Schedulable
]
=
{
def
get
All
Pools
:
ArrayBuffer
[
Schedulable
]
=
{
taskScheduler
.
rootPool
.
schedulableQueue
}
/**
* Return the pool associated with the given name, if one exists
*/
def
getPoolForName
(
pool
:
String
)
:
Option
[
Schedulable
]
=
{
taskScheduler
.
rootPool
.
schedulableNameToSchedulable
.
get
(
pool
)
}
/**
* Return current scheduling mode
*/
...
...
@@ -592,10 +599,6 @@ class SparkContext(
taskScheduler
.
schedulingMode
}
def
getPoolNameToPool
:
HashMap
[
String
,
Schedulable
]
=
{
taskScheduler
.
rootPool
.
schedulableNameToSchedulable
}
/**
* Clear the job's list of files added by `addFile` so that they do not get downloaded to
* any new nodes.
...
...
This diff is collapsed.
Click to expand it.
core/src/main/scala/spark/ui/jobs/PoolTable.scala
+
2
−
2
View file @
b1019941
...
...
@@ -38,7 +38,7 @@ private[spark] class FIFOSource() extends PoolSource {
*/
private
[
spark
]
class
FairSource
(
sc
:
SparkContext
)
extends
PoolSource
{
def
getPools
:
Seq
[
Schedulable
]
=
{
sc
.
getPools
.
toSeq
sc
.
get
All
Pools
.
toSeq
}
}
...
...
@@ -48,7 +48,7 @@ private[spark] class FairSource(sc: SparkContext) extends PoolSource {
private
[
spark
]
class
PoolDetailSource
(
sc
:
SparkContext
,
poolName
:
String
)
extends
PoolSource
{
def
getPools
:
Seq
[
Schedulable
]
=
{
val
pools
=
HashSet
[
Schedulable
]()
pools
+=
sc
.
getPoolName
ToPool
(
poolName
)
pools
+=
sc
.
getPool
For
Name
(
poolName
)
.
get
pools
.
toSeq
}
}
...
...
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