Compare commits

...

7 Commits

Author SHA1 Message Date
Kent Yao
c2da63e8e1 Prepare developing v0.5.3 2019-03-14 17:58:43 +08:00
Kent Yao
e05cc67e96 Prepare releasing v0.5.2 2019-03-14 17:57:49 +08:00
Kent Yao
c327b08395 [KYUUBI-164]display root casue of statement failure on client size (#165)
* [KYUUBI-164]display root casue of statement failure on client size

* fix ut

* fix ut
2019-03-12 17:08:55 +08:00
Kent Yao
0f03f35b0a Prepare developing v0.5.2 2019-03-06 11:57:28 +08:00
Kent Yao
01e27e573e Prepare releasing v0.5.1 2019-03-06 11:54:32 +08:00
Kent Yao
d97a4d7369 fix#158 do not delete session resouces dir in close session (#159) 2019-03-05 20:15:52 +08:00
Kent Yao
f3b3f20bf4 Prepare developing v0.5.0 2019-02-28 17:35:29 +08:00
6 changed files with 26 additions and 25 deletions

View File

@ -22,7 +22,7 @@
<parent>
<artifactId>kyuubi</artifactId>
<groupId>yaooqinn</groupId>
<version>0.5.0</version>
<version>0.5.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -387,25 +387,28 @@ class KyuubiOperation(session: KyuubiSession, statement: String) extends Logging
}
case e: ParseException =>
if (!isClosedOrCanceled) {
onStatementError(
statementId, e.withCommand(statement).getMessage, KyuubiSparkUtil.exceptionString(e))
val err = KyuubiSparkUtil.exceptionString(e)
onStatementError(statementId, e.withCommand(statement).getMessage, err)
throw new KyuubiSQLException(
e.withCommand(statement).getMessage, "ParseException", 2000, e)
e.withCommand(statement).getMessage + err, "ParseException", 2000, e)
}
case e: AnalysisException =>
if (!isClosedOrCanceled) {
onStatementError(statementId, e.getMessage, KyuubiSparkUtil.exceptionString(e))
throw new KyuubiSQLException(e.getMessage, "AnalysisException", 2001, e)
val err = KyuubiSparkUtil.exceptionString(e)
onStatementError(statementId, e.getMessage, err)
throw new KyuubiSQLException(err, "AnalysisException", 2001, e)
}
case e: HiveAccessControlException =>
if (!isClosedOrCanceled) {
onStatementError(statementId, e.getMessage, KyuubiSparkUtil.exceptionString(e))
throw new KyuubiSQLException(e.getMessage, "HiveAccessControlException", 3000, e)
val err = KyuubiSparkUtil.exceptionString(e)
onStatementError(statementId, e.getMessage, err)
throw new KyuubiSQLException(err, "HiveAccessControlException", 3000, e)
}
case e: Throwable =>
if (!isClosedOrCanceled) {
onStatementError(statementId, e.getMessage, KyuubiSparkUtil.exceptionString(e))
throw new KyuubiSQLException(e.toString, "<unknown>", 10000, e)
val err = KyuubiSparkUtil.exceptionString(e)
onStatementError(statementId, e.getMessage, err)
throw new KyuubiSQLException(err, "<unknown>", 10000, e)
}
} finally {
if (statementId != null) {

View File

@ -137,15 +137,6 @@ private[kyuubi] class KyuubiSession(
}
}
private def cleanupSessionResourcesDir(): Unit = {
try {
FileUtils.forceDelete(sessionResourcesDir)
} catch {
case e: Exception =>
error("Failed to cleanup session log dir: " + sessionResourcesDir, e)
}
}
def sparkSession: SparkSession = this.sparkSessionWithUGI.sparkSession
def ugi: UserGroupInformation = this.sessionUGI
@ -205,8 +196,6 @@ private[kyuubi] class KyuubiSession(
// Iterate through the opHandles and close their operations
opHandleSet.foreach(closeOperation)
opHandleSet.clear()
// Cleanup session resources directory
cleanupSessionResourcesDir()
// Cleanup session log directory.
cleanupSessionLogDir()
} finally {

View File

@ -178,8 +178,17 @@ class SparkSessionWithUGI(
}
}
stopContext()
val ke = new KyuubiSQLException(
s"Get SparkSession for [$userName] failed", "08S01", 1001, findCause(e))
val cause = findCause(e)
val msg =
s"""
|Get SparkSession for [$userName] failed
|Diagnosis:
|${sparkException.map(_.getMessage).getOrElse(cause.getMessage)}
|
|Please check if the specified yarn queue [${conf.getOption(QUEUE).getOrElse("")}]
|is available or has sufficient resources left
""".stripMargin
val ke = new KyuubiSQLException(msg, "08S01", 1001, cause)
sparkException.foreach(ke.addSuppressed)
throw ke
} finally {

View File

@ -153,7 +153,7 @@ class SparkSessionWithUGISuite extends SparkFunSuite {
assert(!SparkSessionWithUGI.isPartiallyConstructed(userName1))
val e = intercept[KyuubiSQLException](sparkSessionWithUGI.init(Map.empty))
assert(e.getCause.isInstanceOf[TimeoutException])
assert(e.getMessage.startsWith("Get SparkSession"))
assert(e.getMessage.contains("Get SparkSession"))
}
test("testSetFullyConstructed") {

View File

@ -23,7 +23,7 @@
<groupId>yaooqinn</groupId>
<artifactId>kyuubi</artifactId>
<name>Kyuubi Parent</name>
<version>0.5.0</version>
<version>0.5.3-SNAPSHOT</version>
<modules>
<module>kyuubi-server</module>
</modules>