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
7df20d68
Commit
7df20d68
authored
14 years ago
by
Mosharaf Chowdhury
Browse files
Options
Downloads
Patches
Plain Diff
Combined MaxRxPeers and MaxTxPeers to a single config parameter MaxConnections
parent
b1745b31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scala/spark/LocalFileShuffle.scala
+8
-12
8 additions, 12 deletions
src/scala/spark/LocalFileShuffle.scala
with
8 additions
and
12 deletions
src/scala/spark/LocalFileShuffle.scala
+
8
−
12
View file @
7df20d68
...
...
@@ -85,11 +85,11 @@ class LocalFileShuffle[K, V, C] extends Shuffle[K, V, C] with Logging {
combiners
=
new
HashMap
[
K
,
C
]
var
threadPool
=
LocalFileShuffle
.
newDaemonFixedThreadPool
(
LocalFileShuffle
.
Max
TxPeer
s
)
LocalFileShuffle
.
newDaemonFixedThreadPool
(
LocalFileShuffle
.
Max
Connection
s
)
while
(
hasSplits
<
totalSplits
)
{
var
numThreadsToCreate
=
Math
.
min
(
totalSplits
,
LocalFileShuffle
.
Max
TxPeer
s
)
-
Math
.
min
(
totalSplits
,
LocalFileShuffle
.
Max
Connection
s
)
-
threadPool
.
getActiveCount
while
(
hasSplits
<
totalSplits
&&
numThreadsToCreate
>
0
)
{
...
...
@@ -259,9 +259,8 @@ object LocalFileShuffle extends Logging {
private
var
MinKnockInterval_
=
1000
private
var
MaxKnockInterval_
=
5000
// Maximum number of receiving and sending threads
private
var
MaxRxPeers_
=
4
private
var
MaxTxPeers_
=
4
// Maximum number of connections
private
var
MaxConnections_
=
4
private
var
initialized
=
false
private
var
nextShuffleId
=
new
AtomicLong
(
0
)
...
...
@@ -284,10 +283,8 @@ object LocalFileShuffle extends Logging {
MaxKnockInterval_
=
System
.
getProperty
(
"spark.shuffle.MaxKnockInterval"
,
"5000"
).
toInt
MaxRxPeers_
=
System
.
getProperty
(
"spark.shuffle.MaxRxPeers"
,
"4"
).
toInt
MaxTxPeers_
=
System
.
getProperty
(
"spark.shuffle.MaxTxPeers"
,
"4"
).
toInt
MaxConnections_
=
System
.
getProperty
(
"spark.shuffle.MaxConnections"
,
"4"
).
toInt
// TODO: localDir should be created by some mechanism common to Spark
// so that it can be shared among shuffle, broadcast, etc
...
...
@@ -332,8 +329,7 @@ object LocalFileShuffle extends Logging {
def
MinKnockInterval
=
MinKnockInterval_
def
MaxKnockInterval
=
MaxKnockInterval_
def
MaxRxPeers
=
MaxRxPeers_
def
MaxTxPeers
=
MaxTxPeers_
def
MaxConnections
=
MaxConnections_
def
getOutputFile
(
shuffleId
:
Long
,
inputId
:
Int
,
outputId
:
Int
)
:
File
=
{
initializeIfNeeded
()
...
...
@@ -370,7 +366,7 @@ object LocalFileShuffle extends Logging {
class
ShuffleServer
extends
Thread
with
Logging
{
var
threadPool
=
newDaemonFixedThreadPool
(
LocalFileShuffle
.
Max
RxPeer
s
)
var
threadPool
=
newDaemonFixedThreadPool
(
LocalFileShuffle
.
Max
Connection
s
)
var
serverSocket
:
ServerSocket
=
null
...
...
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