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
1a961dd1
Commit
1a961dd1
authored
11 years ago
by
Dan Crankshaw
Browse files
Options
Downloads
Patches
Plain Diff
Fixed connected components CL params
parent
1e5535cf
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
graph/src/main/scala/org/apache/spark/graph/Analytics.scala
+6
-1
6 additions, 1 deletion
graph/src/main/scala/org/apache/spark/graph/Analytics.scala
with
6 additions
and
1 deletion
graph/src/main/scala/org/apache/spark/graph/Analytics.scala
+
6
−
1
View file @
1a961dd1
...
@@ -161,11 +161,15 @@ object Analytics extends Logging {
...
@@ -161,11 +161,15 @@ object Analytics extends Logging {
case
"cc"
=>
{
case
"cc"
=>
{
var
numIter
=
Int
.
MaxValue
var
numIter
=
Int
.
MaxValue
var
numVPart
=
4
var
numEPart
=
4
var
isDynamic
=
false
var
isDynamic
=
false
options
.
foreach
{
options
.
foreach
{
case
(
"numIter"
,
v
)
=>
numIter
=
v
.
toInt
case
(
"numIter"
,
v
)
=>
numIter
=
v
.
toInt
case
(
"dynamic"
,
v
)
=>
isDynamic
=
v
.
toBoolean
case
(
"dynamic"
,
v
)
=>
isDynamic
=
v
.
toBoolean
case
(
"numEPart"
,
v
)
=>
numEPart
=
v
.
toInt
case
(
"numVPart"
,
v
)
=>
numVPart
=
v
.
toInt
case
(
opt
,
_
)
=>
throw
new
IllegalArgumentException
(
"Invalid option: "
+
opt
)
case
(
opt
,
_
)
=>
throw
new
IllegalArgumentException
(
"Invalid option: "
+
opt
)
}
}
...
@@ -182,7 +186,8 @@ object Analytics extends Logging {
...
@@ -182,7 +186,8 @@ object Analytics extends Logging {
println
(
"======================================"
)
println
(
"======================================"
)
val
sc
=
new
SparkContext
(
host
,
"ConnectedComponents("
+
fname
+
")"
)
val
sc
=
new
SparkContext
(
host
,
"ConnectedComponents("
+
fname
+
")"
)
val
graph
=
GraphLoader
.
textFile
(
sc
,
fname
,
a
=>
1.0F
)
//val graph = GraphLoader.textFile(sc, fname, a => 1.0F)
val
graph
=
GraphLoader
.
textFile
(
sc
,
fname
,
a
=>
1.0F
,
numEPart
).
withPartitioner
(
numVPart
,
numEPart
).
cache
()
val
cc
=
Analytics
.
connectedComponents
(
graph
,
numIter
)
val
cc
=
Analytics
.
connectedComponents
(
graph
,
numIter
)
//val cc = if(isDynamic) Analytics.dynamicConnectedComponents(graph, numIter)
//val cc = if(isDynamic) Analytics.dynamicConnectedComponents(graph, numIter)
// else Analytics.connectedComponents(graph, numIter)
// else Analytics.connectedComponents(graph, numIter)
...
...
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