浏览代码

[livy] Rename BatchSession.lines to logLines

Erick Tryzelaar 10 年之前
父节点
当前提交
07a3e75597

+ 1 - 2
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSession.scala

@@ -21,6 +21,5 @@ package com.cloudera.hue.livy.server.batch
 import com.cloudera.hue.livy.server.Session
 import com.cloudera.hue.livy.server.Session
 
 
 trait BatchSession extends Session {
 trait BatchSession extends Session {
-  def lines: IndexedSeq[String]
-
+  def logLines(): IndexedSeq[String]
 }
 }

+ 1 - 1
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSessionProcess.scala

@@ -74,7 +74,7 @@ private class BatchSessionProcess(val id: Int,
     Success()
     Success()
   }
   }
 
 
-  override def lines: IndexedSeq[String] = process.inputLines
+  override def logLines(): IndexedSeq[String] = process.inputLines
 
 
   override def stop(): Future[Unit] = {
   override def stop(): Future[Unit] = {
     Future {
     Future {

+ 1 - 1
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSessionServlet.scala

@@ -139,7 +139,7 @@ private object Serializers {
   }
   }
 
 
   def getLogs(batch: BatchSession, fromOpt: Option[Int], sizeOpt: Option[Int]): JValue = {
   def getLogs(batch: BatchSession, fromOpt: Option[Int], sizeOpt: Option[Int]): JValue = {
-    val lines = batch.lines
+    val lines = batch.logLines()
 
 
     val size = sizeOpt.getOrElse(100)
     val size = sizeOpt.getOrElse(100)
     var from = fromOpt.getOrElse(-1)
     var from = fromOpt.getOrElse(-1)

+ 1 - 1
apps/spark/java/livy-server/src/main/scala/com/cloudera/hue/livy/server/batch/BatchSessionYarn.scala

@@ -113,5 +113,5 @@ private class BatchSessionYarn(val id: Int, process: LineBufferedProcess, jobFut
     }
     }
   }
   }
 
 
-  override def lines: IndexedSeq[String] = process.inputLines
+  override def logLines(): IndexedSeq[String] = process.inputLines
 }
 }

+ 1 - 1
apps/spark/java/livy-server/src/test/scala/com/cloudera/hue/livy/server/batches/BatchProcessSpec.scala

@@ -60,7 +60,7 @@ class BatchProcessSpec
         batch.state == Success()
         batch.state == Success()
       }, Duration(10, TimeUnit.SECONDS))
       }, Duration(10, TimeUnit.SECONDS))
 
 
-      batch.lines should contain("hello world")
+      batch.logLines() should contain("hello world")
     }
     }
   }
   }
 }
 }