Repository: spark
Updated Branches:
refs/heads/master 7586e2e67 -> 0fe1c0936
[SPARK-3940][SQL] Avoid console printing error messages three times
If wrong sql,the console print error one timesã
egï¼
<pre>
spark-sql> show tabless;
show tabless;
14/10/13 21:03:48 INFO ParseDriver: Parsing command: show tabless
............
at
org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.processCmd(SparkSQLCLIDriver.scala:274)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
at
org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver$.main(SparkSQLCLIDriver.scala:209)
at
org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver.main(SparkSQLCLIDriver.scala)
Caused by: org.apache.hadoop.hive.ql.parse.ParseException: line 1:5 cannot
recognize input near 'show' 'tabless' '<EOF>' in ddl statement
at
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:193)
at
org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:161)
at org.apache.spark.sql.hive.HiveQl$.getAst(HiveQl.scala:218)
at org.apache.spark.sql.hive.HiveQl$.createPlan(HiveQl.scala:226)
... 47 more
Time taken: 4.35 seconds
14/10/13 21:03:51 INFO CliDriver: Time taken: 4.35 seconds
</pre>
Author: wangxiaojing <[email protected]>
Closes #2790 from wangxiaojing/spark-3940 and squashes the following commits:
e2e5c14 [wangxiaojing] sql Print the error code three times
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/0fe1c093
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/0fe1c093
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/0fe1c093
Branch: refs/heads/master
Commit: 0fe1c093690e5af6268182801747dfa6394dfc5b
Parents: 7586e2e
Author: wangxiaojing <[email protected]>
Authored: Mon Oct 20 17:15:24 2014 -0700
Committer: Michael Armbrust <[email protected]>
Committed: Mon Oct 20 17:15:28 2014 -0700
----------------------------------------------------------------------
.../org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/0fe1c093/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
----------------------------------------------------------------------
diff --git
a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
index 7463df1..a5c457c 100644
---
a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
+++
b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLDriver.scala
@@ -62,7 +62,7 @@ private[hive] class SparkSQLDriver(val context: HiveContext =
SparkSQLEnv.hiveCo
} catch {
case cause: Throwable =>
logError(s"Failed in [$command]", cause)
- new CommandProcessorResponse(-3,
ExceptionUtils.getFullStackTrace(cause), null)
+ new CommandProcessorResponse(0,
ExceptionUtils.getFullStackTrace(cause), null)
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]