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
cbfbc019
Commit
cbfbc019
authored
11 years ago
by
jerryshao
Browse files
Options
Downloads
Patches
Plain Diff
Fix configure didn't work small problem in ALS
parent
1d7bef0c
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
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
+8
-7
8 additions, 7 deletions
...ain/scala/org/apache/spark/mllib/recommendation/ALS.scala
with
8 additions
and
7 deletions
mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala
+
8
−
7
View file @
cbfbc019
...
...
@@ -22,7 +22,7 @@ import scala.util.Random
import
scala.util.Sorting
import
org.apache.spark.broadcast.Broadcast
import
org.apache.spark.
{
Logging
,
HashPartitioner
,
Partitioner
,
SparkContext
}
import
org.apache.spark.
{
Logging
,
HashPartitioner
,
Partitioner
,
SparkContext
,
SparkConf
}
import
org.apache.spark.storage.StorageLevel
import
org.apache.spark.rdd.RDD
import
org.apache.spark.serializer.KryoRegistrator
...
...
@@ -578,12 +578,13 @@ object ALS {
val
implicitPrefs
=
if
(
args
.
length
>=
7
)
args
(
6
).
toBoolean
else
false
val
alpha
=
if
(
args
.
length
>=
8
)
args
(
7
).
toDouble
else
1
val
blocks
=
if
(
args
.
length
==
9
)
args
(
8
).
toInt
else
-
1
val
sc
=
new
SparkContext
(
master
,
"ALS"
)
sc
.
conf
.
set
(
"spark.serializer"
,
"org.apache.spark.serializer.KryoSerializer"
)
sc
.
conf
.
set
(
"spark.kryo.registrator"
,
classOf
[
ALSRegistrator
].
getName
)
sc
.
conf
.
set
(
"spark.kryo.referenceTracking"
,
"false"
)
sc
.
conf
.
set
(
"spark.kryoserializer.buffer.mb"
,
"8"
)
sc
.
conf
.
set
(
"spark.locality.wait"
,
"10000"
)
val
conf
=
new
SparkConf
()
.
set
(
"spark.serializer"
,
"org.apache.spark.serializer.KryoSerializer"
)
.
set
(
"spark.kryo.registrator"
,
classOf
[
ALSRegistrator
].
getName
)
.
set
(
"spark.kryo.referenceTracking"
,
"false"
)
.
set
(
"spark.kryoserializer.buffer.mb"
,
"8"
)
.
set
(
"spark.locality.wait"
,
"10000"
)
val
sc
=
new
SparkContext
(
master
,
"ALS"
,
conf
)
val
ratings
=
sc
.
textFile
(
ratingsFile
).
map
{
line
=>
val
fields
=
line
.
split
(
','
)
...
...
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