fix #53 fix endless get log result set

This commit is contained in:
Kent Yao 2018-04-08 15:09:17 +08:00
parent af78af217e
commit 08efac21b7

View File

@ -41,8 +41,8 @@ private[kyuubi] class OperationManager private(name: String)
def this() = this(classOf[OperationManager].getSimpleName)
private[this] lazy val logSchema: StructType = new StructType().add("operation_log", "string")
private[this] val handleToOperation = new ConcurrentHashMap[OperationHandle, KyuubiOperation]
private[this] val userToOperationLog = new ConcurrentHashMap[String, OperationLog]()
override def init(conf: SparkConf): Unit = synchronized {
@ -177,8 +177,6 @@ private[kyuubi] class OperationManager private(name: String)
fetchOrientation == FetchOrientation.FETCH_FIRST
}
private[this] def logSchema: StructType = new StructType().add("operation_log", "string")
def removeExpiredOperations(handles: Seq[OperationHandle]): Seq[KyuubiOperation] = {
handles.flatMap(removeTimedOutOperation).map { op =>
warn("Operation " + op.getHandle + " is timed-out and will be closed")