diff options
author | Hari Shreedharan <hshreedharan@apache.org> | 2015-06-03 16:53:57 -0700 |
---|---|---|
committer | Andrew Or <andrew@databricks.com> | 2015-06-03 16:53:57 -0700 |
commit | 566cb5947925c79ef90af72346672ab7d27bf4df (patch) | |
tree | 186d7c62068bf738c8fd43f890d1ab0963431559 /core | |
parent | bfbdab12dd37587e5518dcbb76507b752759cace (diff) | |
download | spark-566cb5947925c79ef90af72346672ab7d27bf4df.tar.gz spark-566cb5947925c79ef90af72346672ab7d27bf4df.tar.bz2 spark-566cb5947925c79ef90af72346672ab7d27bf4df.zip |
[HOTFIX] History Server API docs error fix.
Minor error in the monitoring docs. Also made indentation changes in `ApiRootResource`
Author: Hari Shreedharan <hshreedharan@apache.org>
Closes #6628 from harishreedharan/eventlog-formatting and squashes the following commits:
a12553d [Hari Shreedharan] Javadoc updates.
ca399b6 [Hari Shreedharan] [HOTFIX] History Server API docs error fix.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala | 10 | ||||
-rw-r--r-- | core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala b/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala index 9af90ee5ec..50b6ba67e9 100644 --- a/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala +++ b/core/src/main/scala/org/apache/spark/status/api/v1/ApiRootResource.scala @@ -167,14 +167,14 @@ private[v1] class ApiRootResource extends UIRootFromServletContext { @Path("applications/{appId}/logs") def getEventLogs( - @PathParam("appId") appId: String): EventLogDownloadResource = { + @PathParam("appId") appId: String): EventLogDownloadResource = { new EventLogDownloadResource(uiRoot, appId, None) } @Path("applications/{appId}/{attemptId}/logs") def getEventLogs( - @PathParam("appId") appId: String, - @PathParam("attemptId") attemptId: String): EventLogDownloadResource = { + @PathParam("appId") appId: String, + @PathParam("attemptId") attemptId: String): EventLogDownloadResource = { new EventLogDownloadResource(uiRoot, appId, Some(attemptId)) } } @@ -206,6 +206,10 @@ private[spark] trait UIRoot { def getSparkUI(appKey: String): Option[SparkUI] def getApplicationInfoList: Iterator[ApplicationInfo] + /** + * Write the event logs for the given app to the [[ZipOutputStream]] instance. If attemptId is + * [[None]], event logs for all attempts of this application will be written out. + */ def writeEventLogs(appId: String, attemptId: Option[String], zipStream: ZipOutputStream): Unit = { Response.serverError() .entity("Event logs are only available through the history server.") diff --git a/core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala b/core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala index d416dba832..22e21f0c62 100644 --- a/core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala +++ b/core/src/main/scala/org/apache/spark/status/api/v1/EventLogDownloadResource.scala @@ -44,7 +44,7 @@ private[v1] class EventLogDownloadResource( } val stream = new StreamingOutput { - override def write(output: OutputStream) = { + override def write(output: OutputStream): Unit = { val zipStream = new ZipOutputStream(output) try { uIRoot.writeEventLogs(appId, attemptId, zipStream) |