GitHub user dilipbiswal opened a pull request:
https://github.com/apache/spark/pull/9194
[SPARK-11188][SQL][WIP] Elide stacktraces in bin/spark-sql for
AnalysisExceptions
I have a couple of questions.
1) I have used the a newly added constructor in hive that takes the
additional parameter
Throwable to construct a CommandProcessorResponse which i use to
match in the caller to find out if the type of exception is
AnalysisException.
Question : Can this code run under an earlier version of Hive ? In
which case this
will trigger a MethodNotFound exception.
If the answer to above question is yes, then i can think of a couple
of options. Please
let me know if there is a preference or a different way.
1) We create a wrapper class that holds CommandProcessorResponse and a
throwable
that we use to match later. We also create a wrapper method to
Driver.run() that
returns CommandProcessorResponseWrapper.I prefer this option as it
seems cleaner.
2) We search for AnalysisException in the exception string
2) The actual exception is also logged in run method of the SparkSQLDriver.
If the
logging is set to CONSOLE then the exception is printed on the screen.
I hope this is ok ?
3) Is there a way to test this ? Since we only suppress printing of the
stack trace , i didn't find a way to hook into any existing test suite.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dilipbiswal/spark spark-11188
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9194.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #9194
----
commit 0c68926935eec48cb4b61175400694d8ff783564
Author: Dilip Biswal <[email protected]>
Date: 2015-10-20T21:15:59Z
[SPARK-11188] Elide stacktraces in bin/spark-sql for AnalysisExceptions
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]