@@ -21,6 +21,5 @@ package com.cloudera.hue.livy.server.batch
import com.cloudera.hue.livy.server.Session
trait BatchSession extends Session {
- def lines: IndexedSeq[String]
-
+ def logLines(): IndexedSeq[String]
}
@@ -74,7 +74,7 @@ private class BatchSessionProcess(val id: Int,
Success()
- override def lines: IndexedSeq[String] = process.inputLines
+ override def logLines(): IndexedSeq[String] = process.inputLines
override def stop(): Future[Unit] = {
Future {
@@ -139,7 +139,7 @@ private object Serializers {
def getLogs(batch: BatchSession, fromOpt: Option[Int], sizeOpt: Option[Int]): JValue = {
- val lines = batch.lines
+ val lines = batch.logLines()
val size = sizeOpt.getOrElse(100)
var from = fromOpt.getOrElse(-1)
@@ -113,5 +113,5 @@ private class BatchSessionYarn(val id: Int, process: LineBufferedProcess, jobFut
@@ -60,7 +60,7 @@ class BatchProcessSpec
batch.state == Success()
}, Duration(10, TimeUnit.SECONDS))
- batch.lines should contain("hello world")
+ batch.logLines() should contain("hello world")