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
0ea1f8b2
Commit
0ea1f8b2
authored
11 years ago
by
Ahir Reddy
Browse files
Options
Downloads
Patches
Plain Diff
Write Spark UI url to driver file on HDFS
parent
39af914b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/src/main/scala/org/apache/spark/scheduler/cluster/SimrSchedulerBackend.scala
+1
-11
1 addition, 11 deletions
...apache/spark/scheduler/cluster/SimrSchedulerBackend.scala
with
1 addition
and
11 deletions
core/src/main/scala/org/apache/spark/scheduler/cluster/SimrSchedulerBackend.scala
+
1
−
11
View file @
0ea1f8b2
...
...
@@ -31,10 +31,6 @@ private[spark] class SimrSchedulerBackend(
val
tmpPath
=
new
Path
(
driverFilePath
+
"_tmp"
)
val
filePath
=
new
Path
(
driverFilePath
)
val
uiFilePath
=
driverFilePath
+
"_ui"
val
tmpUiPath
=
new
Path
(
uiFilePath
+
"_tmp"
)
val
uiPath
=
new
Path
(
uiFilePath
)
val
maxCores
=
System
.
getProperty
(
"spark.simr.executor.cores"
,
"1"
).
toInt
override
def
start
()
{
...
...
@@ -49,23 +45,17 @@ private[spark] class SimrSchedulerBackend(
logInfo
(
"Writing to HDFS file: "
+
driverFilePath
)
logInfo
(
"Writing Akka address: "
+
driverUrl
)
logInfo
(
"Writing to HDFS file: "
+
uiFilePath
)
logInfo
(
"Writing Spark UI Address: "
+
sc
.
ui
.
appUIAddress
)
// Create temporary file to prevent race condition where executors get empty driverUrl file
val
temp
=
fs
.
create
(
tmpPath
,
true
)
temp
.
writeUTF
(
driverUrl
)
temp
.
writeInt
(
maxCores
)
temp
.
writeUTF
(
sc
.
ui
.
appUIAddress
)
temp
.
close
()
// "Atomic" rename
fs
.
rename
(
tmpPath
,
filePath
)
// Write Spark UI Address to file
val
uiTemp
=
fs
.
create
(
tmpUiPath
,
true
)
uiTemp
.
writeUTF
(
sc
.
ui
.
appUIAddress
)
uiTemp
.
close
()
fs
.
rename
(
tmpUiPath
,
uiPath
)
}
override
def
stop
()
{
...
...
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