diff options
author | Denny <dennybritz@gmail.com> | 2012-07-31 08:39:24 -0700 |
---|---|---|
committer | Denny <dennybritz@gmail.com> | 2012-08-01 11:01:09 -0700 |
commit | 7a295fee9641e7b9480dd5cb520afe45039ffbe0 (patch) | |
tree | b89a6bf716cdbc0821267ab070c1f9761fff6adb /core/src/main/twirl/masterui | |
parent | f471c82558347216985a8b7015309c4cce099cc4 (diff) | |
download | spark-7a295fee9641e7b9480dd5cb520afe45039ffbe0.tar.gz spark-7a295fee9641e7b9480dd5cb520afe45039ffbe0.tar.bz2 spark-7a295fee9641e7b9480dd5cb520afe45039ffbe0.zip |
Spark WebUI Implementation.
Diffstat (limited to 'core/src/main/twirl/masterui')
-rw-r--r-- | core/src/main/twirl/masterui/executor_row.scala.html | 15 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/executors_table.scala.html | 19 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/index.scala.html | 37 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/job_details.scala.html | 34 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/job_row.scala.html | 15 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/job_table.scala.html | 20 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/worker_row.scala.html | 11 | ||||
-rw-r--r-- | core/src/main/twirl/masterui/worker_table.scala.html | 18 |
8 files changed, 169 insertions, 0 deletions
diff --git a/core/src/main/twirl/masterui/executor_row.scala.html b/core/src/main/twirl/masterui/executor_row.scala.html new file mode 100644 index 0000000000..784d692fc2 --- /dev/null +++ b/core/src/main/twirl/masterui/executor_row.scala.html @@ -0,0 +1,15 @@ +@(executor: spark.deploy.master.ExecutorInfo) + +<tr> + <td>@executor.id</td> + <td> + <a href="@executor.worker.webUiAddress">@executor.worker.id</href> + </td> + <td>@executor.cores</td> + <td>@executor.memory</td> + <td>@executor.state</td> + <td> + <a href="@(executor.worker.webUiAddress)/log?jobId=@(executor.job.id)&executorId=@(executor.id)&logType=stdout">stdout</a> + <a href="@(executor.worker.webUiAddress)/log?jobId=@(executor.job.id)&executorId=@(executor.id)&logType=stderr">stderr</a> + </td> +</tr>
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/executors_table.scala.html b/core/src/main/twirl/masterui/executors_table.scala.html new file mode 100644 index 0000000000..cafc42c80e --- /dev/null +++ b/core/src/main/twirl/masterui/executors_table.scala.html @@ -0,0 +1,19 @@ +@(executors: List[spark.deploy.master.ExecutorInfo]) + +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>ExecutorID</th> + <th>Worker</th> + <th>Cores</th> + <th>Memory</th> + <th>State</th> + <th>Logs</th> + </tr> + </thead> + <tbody> + @for(e <- executors) { + @executor_row(e) + } + </tbody> +</table>
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/index.scala.html b/core/src/main/twirl/masterui/index.scala.html new file mode 100644 index 0000000000..ddf6163765 --- /dev/null +++ b/core/src/main/twirl/masterui/index.scala.html @@ -0,0 +1,37 @@ +@(jobs: List[spark.deploy.master.JobInfo], workers: List[spark.deploy.master.WorkerInfo]) +@import spark.deploy.master._ + +@common.html.layout(title = "Master WebUI") { + + <!-- Cluster Summary (Workers) --> + <div class="row"> + <div class="span12"> + <h3> Cluster Summary </h3> + <br/> + @worker_table(workers) + </div> + </div> + + <hr/> + + <!-- Job Summary (Running) --> + <div class="row"> + <div class="span12"> + <h3> Running Jobs </h3> + <br/> + @job_table(jobs.filter(j => j.state == JobState.WAITING || j.state == JobState.RUNNING)) + </div> + </div> + + <hr/> + + <!-- Job Summary (Completed) --> + <div class="row"> + <div class="span12"> + <h3> Completed Jobs </h3> + <br/> + @job_table(jobs.filter(j => j.state == JobState.FINISHED || j.state == JobState.FAILED)) + </div> + </div> + +}
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/job_details.scala.html b/core/src/main/twirl/masterui/job_details.scala.html new file mode 100644 index 0000000000..a1fa4ab1ac --- /dev/null +++ b/core/src/main/twirl/masterui/job_details.scala.html @@ -0,0 +1,34 @@ +@(job: spark.deploy.master.JobInfo) + +@common.html.layout(title = "Job Details") { + + <!-- Job Details --> + <div class="row"> + <div class="span12"> + <ul class="unstyled"> + <li><strong>ID:</strong> @job.id</li> + <li><strong>Description:</strong> @job.desc.name</li> + <li><strong>User:</strong> @job.desc.user</li> + <li><strong>Cores:</strong> @job.desc.cores</li> + <li><strong>Memory per Slave:</strong> @job.desc.memoryPerSlave</li> + <li><strong>Submit Date:</strong> @job.submitDate</li> + <li><strong>State:</strong> @job.state</li> + <li><strong>Cores Granted:</strong> @job.coresGranted</li> + <li><strong>Cores Left:</strong> @job.coresLeft</li> + <li><strong>Command:</strong> @job.desc.command</li> + </ul> + </div> + </div> + + <hr/> + + <!-- Executors --> + <div class="row"> + <div class="span12"> + <h3> Executor Summary </h3> + <br/> + @executors_table(job.executors.values.toList) + </div> + </div> + +}
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/job_row.scala.html b/core/src/main/twirl/masterui/job_row.scala.html new file mode 100644 index 0000000000..1d0d1650c0 --- /dev/null +++ b/core/src/main/twirl/masterui/job_row.scala.html @@ -0,0 +1,15 @@ +@(job: spark.deploy.master.JobInfo) + +<tr> + <td> + <a href="job?jobId=@(job.id)">@job.id</a> + </td> + <td>@job.desc</td> + <td> + @job.coresGranted Granted, @job.coresLeft Left + </td> + <td>@job.desc.memoryPerSlave</td> + <td>@job.submitDate</td> + <td>@job.desc.user</td> + <td>@job.state.toString()</td> +</tr>
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/job_table.scala.html b/core/src/main/twirl/masterui/job_table.scala.html new file mode 100644 index 0000000000..b3b1e4d472 --- /dev/null +++ b/core/src/main/twirl/masterui/job_table.scala.html @@ -0,0 +1,20 @@ +@(jobs: List[spark.deploy.master.JobInfo]) + +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>JobID</th> + <th>Description</th> + <th>Cores</th> + <th>Memory per Slave</th> + <th>Submit Date</th> + <th>User</th> + <th>State</th> + </tr> + </thead> + <tbody> + @for(j <- jobs) { + @job_row(j) + } + </tbody> +</table>
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/worker_row.scala.html b/core/src/main/twirl/masterui/worker_row.scala.html new file mode 100644 index 0000000000..6c8aaaae60 --- /dev/null +++ b/core/src/main/twirl/masterui/worker_row.scala.html @@ -0,0 +1,11 @@ +@(worker: spark.deploy.master.WorkerInfo) + +<tr> + <td> + <a href="http://@worker.host:@worker.webUiPort">@worker.id</href> + </td> + <td>@worker.host</td> + <td>@worker.port</td> + <td>@worker.cores (@worker.coresUsed Used)</td> + <td>@worker.memory (@worker.memoryUsed Used)</td> +</tr>
\ No newline at end of file diff --git a/core/src/main/twirl/masterui/worker_table.scala.html b/core/src/main/twirl/masterui/worker_table.scala.html new file mode 100644 index 0000000000..201af5383a --- /dev/null +++ b/core/src/main/twirl/masterui/worker_table.scala.html @@ -0,0 +1,18 @@ +@(workers: List[spark.deploy.master.WorkerInfo]) + +<table class="table table-bordered table-striped table-condensed"> + <thead> + <tr> + <th>ID</th> + <th>Host</th> + <th>Port</th> + <th>Cores</th> + <th>Memory</th> + </tr> + </thead> + <tbody> + @for(w <- workers) { + @worker_row(w) + } + </tbody> +</table>
\ No newline at end of file |