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
146a18c2
Commit
146a18c2
authored
13 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' into scala-2.9
parents
8ea67307
c8eb8b2b
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/Executor.scala
+4
-0
4 additions, 0 deletions
core/src/main/scala/spark/Executor.scala
core/src/main/scala/spark/SparkContext.scala
+5
-0
5 additions, 0 deletions
core/src/main/scala/spark/SparkContext.scala
with
9 additions
and
0 deletions
core/src/main/scala/spark/Executor.scala
+
4
−
0
View file @
146a18c2
...
@@ -4,6 +4,7 @@ import java.io.{File, FileOutputStream}
...
@@ -4,6 +4,7 @@ import java.io.{File, FileOutputStream}
import
java.net.
{
URI
,
URL
,
URLClassLoader
}
import
java.net.
{
URI
,
URL
,
URLClassLoader
}
import
java.util.concurrent._
import
java.util.concurrent._
import
scala.actors.remote.RemoteActor
import
scala.collection.mutable.ArrayBuffer
import
scala.collection.mutable.ArrayBuffer
import
mesos.
{
ExecutorArgs
,
ExecutorDriver
,
MesosExecutorDriver
}
import
mesos.
{
ExecutorArgs
,
ExecutorDriver
,
MesosExecutorDriver
}
...
@@ -25,6 +26,9 @@ class Executor extends mesos.Executor with Logging {
...
@@ -25,6 +26,9 @@ class Executor extends mesos.Executor with Logging {
for
((
key
,
value
)
<-
props
)
for
((
key
,
value
)
<-
props
)
System
.
setProperty
(
key
,
value
)
System
.
setProperty
(
key
,
value
)
// Make sure an appropriate class loader is set for remote actors
RemoteActor
.
classLoader
=
getClass
.
getClassLoader
// Initialize Spark environment (using system properties read above)
// Initialize Spark environment (using system properties read above)
env
=
SparkEnv
.
createFromSystemProperties
(
false
)
env
=
SparkEnv
.
createFromSystemProperties
(
false
)
SparkEnv
.
set
(
env
)
SparkEnv
.
set
(
env
)
...
...
This diff is collapsed.
Click to expand it.
core/src/main/scala/spark/SparkContext.scala
+
5
−
0
View file @
146a18c2
...
@@ -3,6 +3,7 @@ package spark
...
@@ -3,6 +3,7 @@ package spark
import
java.io._
import
java.io._
import
java.util.concurrent.atomic.AtomicInteger
import
java.util.concurrent.atomic.AtomicInteger
import
scala.actors.remote.RemoteActor
import
scala.collection.mutable.ArrayBuffer
import
scala.collection.mutable.ArrayBuffer
import
org.apache.hadoop.mapred.InputFormat
import
org.apache.hadoop.mapred.InputFormat
...
@@ -37,6 +38,10 @@ extends Logging {
...
@@ -37,6 +38,10 @@ extends Logging {
System
.
setProperty
(
"spark.master.host"
,
Utils
.
localHostName
)
System
.
setProperty
(
"spark.master.host"
,
Utils
.
localHostName
)
if
(
System
.
getProperty
(
"spark.master.port"
)
==
null
)
if
(
System
.
getProperty
(
"spark.master.port"
)
==
null
)
System
.
setProperty
(
"spark.master.port"
,
"50501"
)
System
.
setProperty
(
"spark.master.port"
,
"50501"
)
// Make sure a proper class loader is set for remote actors (unless user set one)
if
(
RemoteActor
.
classLoader
==
null
)
RemoteActor
.
classLoader
=
getClass
.
getClassLoader
// Create the Spark execution environment (cache, map output tracker, etc)
// Create the Spark execution environment (cache, map output tracker, etc)
val
env
=
SparkEnv
.
createFromSystemProperties
(
true
)
val
env
=
SparkEnv
.
createFromSystemProperties
(
true
)
...
...
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